Whenever we want to submit the request to the apps through the SQL we use this API. The syntax and a simple example were given below.
Syntax:
FND_REQUEST.SUBMIT_REQUEST(
Application, à we have to pass the short name of the application concurrent Program in which we registered (Ex: Oracle Receivables = AR).
Program, à Pass the short name of the concurrent program
Description, à description of the concurrent program
Start-time, à start time of the concurrent program
Sub-request, à if there any other request, pass true other wise false.
Arg-1, àthese arg1 to arg100 are used to pass the parameters to the concurrent program.
Arg100);
Totally FND_REQUEST.SUBMIT_REQUEST API is having the 105 parameters.
EX: Declare
id number;
begin
FND_GLOBAL_APPS_INITIALIZE(1007899,20420,1);
Id:=FND_REQUEST.SUBMIT_REQUEST(‘AR’,CSPROC,NULL, NULL, FALSE, 20, RESEARCH);
dbms_output.put_line(‘Request ID:’ || id);
commit;
end;
O/P: Request ID: 2725363
Example:
PROCEDURE URSTING_PRG (
errbuf OUT VARCHAR2,
retcode OUT NUMBER,
v_req_id OUT NUMBER,
v_dev_status OUT VARCHAR2,
v_dev_phase OUT VARCHAR2,
v_request_status OUT BOOLEAN,
p_request_id number
) IS
v_layout BOOLEAN;
--v_request_status BOOLEAN;
v_phase VARCHAR2 (2000);
v_wait_status VARCHAR2 (2000);
--v_dev_phase VARCHAR2 (2000);
--v_dev_status VARCHAR2 (2000);
v_message VARCHAR2 (2000);
BEGIN
FND_FILE.PUT_LINE(FND_FILE.LOG,' Starting of Bursting Procedure BURSTING_PRG');
v_req_id :=NULL;
FND_FILE.PUT_LINE(FND_FILE.LOG,' Initializing Apps');
FND_GLOBAL.Apps_Initialize(FND_GLOBAL.USER_ID, FND_GLOBAL.RESP_ID, FND_GLOBAL.RESP_APPL_ID);
v_layout := FND_REQUEST.ADD_LAYOUT('XDO'
,'BURST_STATUS_REPORT'
,'en'
,'US'
,'PDF');
v_req_id:= FND_REQUEST.SUBMIT_REQUEST(
'XDO',
'XDOBURSTREP',
'',
'',
FALSE,
p_request_id,'N',
chr(0),'','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','');
commit;
FND_FILE.PUT_LINE(FND_FILE.LOG,' Submitted the Bursting Program' || '-'|| v_req_id);
FND_FILE.PUT_LINE(FND_FILE.LOG,' Waiting for the Bursting Program');
v_request_status:=
fnd_concurrent.wait_for_request
(request_id => v_req_id,
INTERVAL => 5,
max_wait => 600,
phase => v_phase,
status => v_wait_status,
dev_phase => v_dev_phase,
dev_status => v_dev_status,
MESSAGE => v_message);
commit;
FND_FILE.PUT_LINE(FND_FILE.LOG,' Bursting Program Request Phase' || '-'|| v_dev_phase);
FND_FILE.PUT_LINE(FND_FILE.LOG,' Bursting Program Request Dev status' || '-'|| v_dev_status);
EXCEPTION
WHEN OTHERS THEN
v_req_id := null;
FND_FILE.PUT_LINE(FND_FILE.LOG,' Ending of Bursting Procedure GEPS_BURSTING_PRG');
END BURSTING_PRG;
Hi there, My code used to work on R12.0.6 but when I upgraded to R12.1.3 it does not work anymore, calling SUBMIT_REQUEST always returns 0 .. How can I check what is the problem? I'm trying to call program INCTCM in application INV but regardless, since I upgraded EBS I cannot submit any request. Any help?
ReplyDelete