- OracleApps Epicenter - http://www.oracleappshub.com -

Oracle API Availability – Concurrent Program

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..

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.

Usage :

fnd_submit.set_print_options(NULL,NULL,NULL,TRUE,'N');

or

  • fnd_request.set_print_options (printer =>'<printer name>',
    style =>'LANDSCAPE',
    copies=>1,
    save_output => TRUE,
    print_together => 'N')

Usage

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, returns TRUE or FALSE
  • Returns status information in function output parameters

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.

Usage

IF request_id = 0 THEN
fnd_file.put_line(fnd_file.log, 'Request Not Submitted.');
ELSE

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);

END IF;

IF call_status = TRUE THEN
IF dev_request_phase!= 'Completed' OR
dev_request_status IN ('Cancelled','Error','Terminated') THEN
DBMS_OUTPUT.PUT_LINE('STATUS=JOB FAILED');
END IF;
ELSE
DBMS_OUTPUT.PUT_LINE('WAIT FOR REQUEST FAILED - STATUS UNKNOWN');
DBMS_OUTPUT.PUT_LINE('STATUS=JOB FAILED');
END IF;

Usage
FND_SUBMIT.ADD_NOTIFICATION (user ==>'ANAND') ;

Make sure the name should be from fnd_user table

Usage
FND_SUBMIT.SET_NLS_OPTIONS (language =>'US',
territory => NULL);

6 Comments (Open | Close)

6 Comments To "Oracle API Availability – Concurrent Program"

#1 Comment By krishnab On August 28, 2007 @ 3:10 am

In Oracle Apps Some tables ends with TL,VL,what is the significance of the TL and VL?

#2 Comment By krishnab On August 28, 2007 @ 3:11 am

What will happen If I am not giveing the Suspense accout while defineing the Set of Books in GL?

#3 Comment By krishnab On August 28, 2007 @ 3:11 am

What is the Use of User Exit in Oracle apps and when we are developeing the new report you need to pass one parameter called P_CONC_REQUEST_ID,what is the use of this parameter and is it mandatory.Can’t we develop report without this User exit’s and P_CONC_REQUEST_ID parameter

#4 Comment By krishnab On August 28, 2007 @ 3:13 am

How You Will display the key flexifields in your report?

#5 Comment By krishnab On August 28, 2007 @ 3:13 am

How you will Diaplay the Company LOGO In report.Can anyone knows please give solution?

#6 Comment By Gowri On April 7, 2008 @ 7:47 am

This is a very useful site. I have a question about concurrent request api’s discussed here. How we can specify the api engine to take parameters from their default value settings instead of supplying while submmitting the FND_Request.submit.

Thanks