Anda di halaman 1dari 2

First run this query,

select * from apps.fnd_concurrent_requests


we get responsibility id and responsibility application id.Pass this values in t
he below procedure
then run this query to get the user_id
select * from apps.fnd_user where user_name = 'SNATHAN' ---- which is oracle sho
rt name

DECLARE
l_success NUMBER;
BEGIN
BEGIN
fnd_global.apps_initialize( user_id => 2572694, resp_id => 50407, resp_appl_id
=> 20003);
-- If you are directly running from the database using the TOAD, SQL-NAVIGATOR
or --SQL*PLUS etc. Then you need to Initialize the Apps. In this case use the
above API to --Initialize the APPS. If you are using same code in some procedure
and running directly
--from application then you don't need to initalize.
--Then you 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 backend Report', -- Description of 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 the above request Run, I have created the Report, which has one
parameter.
IF l_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' );
END IF;
--Note:- If you are running directly from database, use DBMS API to display. If
you are
-- Running directly from Application, then Use the fnd_file API to write the

message
-- in the log file.
END;