Submit the Concurrent Program from backend

on Thursday, February 26, 2009

The following is the Sample Code to Submit the Concurrent Programfrom the backend.

Note:- This is the Concurrent Program, not the RequestSet. To Submit the Request Set from the
backend, We have different API.


DECLARE
l_success NUMBER;
BEGIN
BEGIN

fnd_global.apps_initialize( user_id=> 2572694, resp_id => 50407, resp_appl_id => 20003);


-- If you are directlyrunning from the database using the TOAD, SQL-NAVIGATOR or SQL*PLUS etc. Then you need to Initialize the Apps.
-- In thiscase use the above API to Initialize the APPS. If you are using same code insome procedure and running directly fromapplication then you don't need to initalize.
-- Thenyou can comment the above API.


l_success:=
fnd_request.submit_request

('XXAPP',-- Application Short name of the Concurrent Program.
'XXPRO_RPT', --Program Short Name.
'
Program For testing the backendReport', -- Descriptionof the Program.

SYSDATE, --Submitted date. Always give the SYSDATE.

FALSE, --Always give the FLASE.

'1234' --Passing the Value to the First Parameter of the report.
);

COMMIT;


--Note:- In theabove request Run, I have created the Report, which has one parameter.

IFl_success = 0
THEN
-- fnd_file.put_line(fnd_file.LOG, 'Request submission For this store FAILED' );
DBMS_OUTPUT.PUT_LINE('Request submission For this store FAILED' );
ELSE
-- fnd_file.put_line(fnd_file.LOG, 'Request submission for this store SUCCESSFUL');
DBMS_OUTPUT.PUT_LINE('Request submission For this store SUCCESSFUL' );
ENDIF;


--Note:- If you arerunning directly from database, use DBMS API to display.
--If you are
running directly fromApplication, then Use the fnd_file API to write themessage in the log file.

END;



No comments: