Monday, 9 June 2014

How to submit the concurrent request from PLSQL

We first need to initialise oracle applications session (FND_GLOBAL.APPS_INITIALIZE) then only we can call this "FND_REQUEST.SUBMIT_REQUEST".

Syntax

DECLARE
vn_resp_appl_id NUMBER;
vn_resp_id NUMBER;
vn_user_id NUMBER;
vn_request_id NUMBER;
BEGIN

/* Getting Profile option values */
vn_resp_appl_id := apps.fnd_profile.VALUE ('RESP_APPL_ID');
vn_resp_id := apps.fnd_profile.VALUE ('RESP_ID');
vn_user_id := apps.fnd_profile.VALUE ('USER_ID');

/* Application Initialisation */
apps.fnd_global.apps_initialize (n_user_id, n_resp_id, n_resp_appl_id);

/* Concurrent request submission */
vn_request_id := apps.fnd_request.submit_request (
application IN VARCHAR2 DEFAULT NULL,
program IN VARCHAR2 DEFAULT NULL,
description IN VARCHAR2 DEFAULT NULL,
start_time IN VARCHAR2 DEFAULT NULL,
sub_request IN BOOLEAN DEFAULT FALSE,
argument1 IN VARCHAR2 DEFAULT CHR (0),
argument2 IN VARCHAR2 DEFAULT CHR (0),
argument3 IN VARCHAR2 DEFAULT CHR (0),
----- argument4 to argument99 -------------
argument100 IN VARCHAR2 DEFAULT CHR (0)
);

/* Commit */
COMMIT;
END;

FND_REQUEST.SUBMIT_REQUEST {Description}

application : Short name of application under which the program is registered.
program : concurrent program name for which the request has to be submitted.
description : [Optional] Will be displayed along with user concurrent program name.
start_time : [Optional] Time at which the request has to start running.
sub_request : [Optional] Set to TRUE if the request is submitted from another running request and has to be treated as a sub request. Default is FALSE
argument1..100 : [Optional] Arguments {parameters} for the concurrent req

No comments:

Post a Comment