- OracleApps Epicenter - http://www.oracleappshub.com -
Oracle API Availability – Concurrent Program
Posted By Sanjit Anand On August 7, 2007 @ 6:53 am In API Integration | 6 Comments
Many times, we need to submit concurrent requests and request sets from non SRS window like operating system or PL/sql . In Oracle Applications there are APIâ€™s to take these options. Here are some of the API's function and usage..
FND_REQUEST.SET_OPTIONS(IMPLICIT = > 'ERROR');
Called before submitting request if the printing of output has to be controlled with specific printer/style/copies etc., Optionally call for each program in the request set.
- fnd_request.set_print_options (printer =>'<printer name>',
save_output => TRUE,print_together => 'N')
Function FND_SUBMIT.ADD_PRINTER (printer =>'Printer Name',
copies => null) ;
When submitting concurrent requests using PL/SQL, it is often desired to have the parent process wait until all the child processes have completed before completing itself.
This function Wait for the request completion, then return the request phase/status and completion message to the caller. Also call sleep between database checks.
FUNCTION WAIT_FOR_REQUEST (request_id IN number default NULL,
interval IN number default 60,
max_wait IN number default 0,
phase OUT varchar2,
status OUT varchar2,
dev_phase OUT varchar2,
dev_status OUT varchar2,
message OUT varchar2) return Boolean;
This API Wait for the request completion, then return the request phase/status and completion message to the caller. Also call sleep between database checks.
- Arguments (input)
- request_id :The request ID of the program to wait on.
- interval :Time to wait between checks. This is the number of seconds to sleep. The default is 60 seconds.
- max_wait :The maximum time in seconds to wait for the requests completion.
- Arguments (output) :
- phase :The user friendly request phase from FND_LOOKUPS.
- status :The user friendly request status from FND_LOOKUPS.
- dev_phase :The request phase as a constant string that can be used for program logic comparisons.
- dev_status :The request status as a constant string that can be used for program logic comparisons.
- message :The completion message supplied if the request has completed.
IF request_id = 0 THEN
fnd_file.put_line(fnd_file.log, 'Request Not Submitted.');
call_status := fnd_concurrent.wait_for_request(request_id, v_interval, v_max_wait, request_phase, request_status, dev_request_phase, dev_request_status, request_status_mesg);
IF call_status = TRUE THEN
IF dev_request_phase!= 'Completed' OR
dev_request_status IN ('Cancelled','Error','Terminated') THEN
DBMS_OUTPUT.PUT_LINE('WAIT FOR REQUEST FAILED - STATUS UNKNOWN');
FND_SUBMIT.ADD_NOTIFICATION (user ==>'ANAND') ;
Make sure the name should be from fnd_user table
FND_SUBMIT.SET_NLS_OPTIONS (language =>'US',
territory => NULL);
Article printed from OracleApps Epicenter: http://www.oracleappshub.com
URL to article: http://www.oracleappshub.com/api/oracle-api-availability-concurrent-program/
Disclaimer The opinions expressed here represent solely my own represent personal conjecture based upon experience, practice and observation and does not represent the thoughts, intentions, plans or strategies of my current & previous employers and their clients. Copyright © 2007-2010 OracleApps Epicenter. All rights reserved.