Sample Code For FND - Submit and FND - Request API
Sample Code For FND - Submit and FND - Request API
E-Business Suite Concurrent Processing - Sample Code for FND_SUBMIT and FND_REQUEST API's (Doc
ID 221542.1)
In this Document
Purpose
Requirements
Configuring
Instructions
Script
APPLIES TO:
PURPOSE
This sample code provides an example of usage of FND_REQUEST and FND_SUBMIT API's.
The code provided here is given as a reference, although the API's are supported this example code is not supported.
REQUIREMENTS
CONFIGURING
Creates a procedure called fnd_submit_test that can be registered and run as a concurrent program.
This procedure will use the FND_SUBMIT API to submit a request set. (Function Security Reports - This request set should be seeded, if
it is not available the values in the script may need to be changed.) The procedure will then place itself in a Paused status until the
request set completes.
INSTRUCTIONS
CAUTION
This sample code is provided for educational purposes only, and is not supported by Oracle Support. It has been tested internally,
however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.
SCRIPT
REM +==========================================================================
REM | Concurrent Processing Sample Code
REM |
REM | FILE:
REM | fnd_submit_test.pls
REM |
REM | REVISION:
REM | $Id$
REM |
REM | DESCRIPTION:
REM | FND_SUBMIT test procedure and sample code
REM | Creates a procedure called fnd_submit_test that can be registered
REM | and run as a concurrent program.
REM | This procedure will use the FND_SUBMIT API to submit a request set.
success boolean;
req_id number;
req_data varchar2(10);
srs_failed exception;
submitprog_failed exception;
submitset_failed exception;
begin
errbuf := 'Done!';
retcode := 0 ;
return;
end if;
raise submitprog_failed;
end if;
req_id := fnd_submit.submit_set(null,true);
if (req_id = 0 ) then
raise submitset_failed;
end if;
fnd_file.put_line(fnd_file.log, 'Finished.');
exception
when srs_failed then
errbuf := 'Call to set_request_set failed: ' || fnd_message.get;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
when submitprog_failed then
errbuf := 'Call to submit_program failed: ' || fnd_message.get;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
when submitset_failed then
errbuf := 'Call to submit_set failed: ' || fnd_message.get;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
when others then
errbuf := 'Request set submission failed - unknown error: ' || sqlerrm;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
end;
/
rem ===================================================================
commit;
exit;