Home » Applications » Oracle Fusion Apps & E-Business Suite » fnd_request.submit_request returns 0 (11.5.10.2)
fnd_request.submit_request returns 0 [message #338359] Mon, 04 August 2008 13:41
deal_my
Messages: 7
Registered: June 2008
Junior Member
I'm trying to submit a conc prog from pl/sql procedure using fnd_request.submit_request. But it returns 0.
Below is the proc i'm using.

9249-is user_id
50086-id number of responsibilty from which the conc prog is submitted
0- is application id of tht resp.

Any suggestions would be of great help. Thanks



CREATE OR REPLACE procedure te_valid_report_proc_test
(errbuf out varchar2, retcode out varchar2)
as
l_errbuf varchar2(2000) := '' ;
l_retcode number(1) := 0;
l_phase varchar2(2000) := '' ;
l_status varchar2(2000) := '' ;
l_dev_phase varchar2(2000) := '' ;
l_dev_status varchar2(2000) := '' ;
l_message varchar2(2000) := '' ;
l_request_id number := 0;
l_get_request_status boolean ;
begin

Begin
apps.fnd_global.apps_initialize (9249,50086,0);
end;


retcode := 0;
apps.fnd_file.put_line(apps.FND_FILE.LOG,'T&E test procedure');
l_request_id := apps.fnd_request.submit_request('XBO','CBIZ_TE_VALIDATION_REPORT','CBIZ_TE_validation_report','');
commit;
if l_request_id = 0 then
l_errbuf := 'Request id is zero' ;
--FND_FILE.PUT_LINE(FND_FILE.log,l_errbuf);
retcode := 1;
else
l_errbuf := 'Request id '||to_char(l_request_id) ;
--FND_FILE.PUT_LINE(fnd_file.log, l_errbuf);
l_errbuf := 'Monitoring request '||to_char(l_request_id) ;
--FND_FILE.PUT_LINE(FND_FILE.log,l_errbuf);
l_get_request_status := apps.fnd_concurrent.wait_for_request(l_request_id, 60, 0, l_phase, l_status, l_dev_phase, l_dev_status, l_message);
if l_dev_status = 'ERROR' then
l_errbuf := 'Import failed with message '||l_message ;
-- FND_FILE.PUT_LINE(FND_FILE.log,l_errbuf);
retcode := 2;
else
l_errbuf := 'Request finished with status '||l_status ;
-- FND_FILE.PUT_LINE(FND_FILE.log,l_errbuf);
end if ;
end if;
--fnd_file.put_line(FND_FILE.LOG, 'COMPLETED RUN. Retcode = '|| retcode);

dbms_output.put_line(l_errbuf);

exception
when others then
retcode := 3;
-- fnd_file.put_line(FND_FILE.LOG, 'ABORTED RUN. Retcode = '|| retcode);
end te_valid_report_proc_test;
Previous Topic: CE Bank Statement Loading
Next Topic: Expense Reports Fields
Goto Forum:
  


Current Time: Wed Dec 25 07:28:31 CST 2024