Showing posts with label PL/SQL Coding. Show all posts
Showing posts with label PL/SQL Coding. Show all posts

Thursday, October 14, 2010

Helpful View for Concurrent Request Details

Select * from apps.fnd_amp_requests_v where request_id = XXXXX

Use this View to get helpful info on the status of a concurrent request, who submitted and what responsibility it was run under. Very help View!

Friday, July 06, 2007

fnd_request.submit_request handy tip.

Here is a HANDY TIP that could save you some time bugging why the fnd_request.submit_request procedure is returning a request_id of 0. If you are creating and running a package to run outside Oracle Applications, you may be wondering why the procedure will not be executing your concurrent program being passed into into the fnd_request.submit_request procedure.

The first make sure that you are passing in the correct parameters into the procedure. Once you are confident that you have the correct parameters make sure you call the FND_GLOBAL.APPS_INITIALIZE procedure prior to calling the submit_request procedure. Since you are executing the package outside of the application you need to intialize your user_id, responsibility_id and Applicaiton_id within your executing procedure.

It sounds like common sense but it is easy to over look!

Below is a snipit of code for submitting the gl journal import program from a Procedure:

BEGIN

...

SELECT user_id
INTO x_user_id
FROM FND_USER
WHERE user_name = ;


SELECT application_id
INTO x_appl_id
FROM FND_APPLICATION
WHERE application_short_name = 'SQLGL';


SELECT responsibility_id
INTO x_resp_id
FROM FND_APPLICATION fa, FND_RESPONSIBILITY_TL fr
WHERE fa.application_short_name = 'SQLGL' AND
fa.application_id = fr.application_id AND
fr.responsibility_name = 'General Ledger Super User';

FND_GLOBAL.APPS_INITIALIZE(x_user_id, x_resp_id, x_appl_id);

x_conc_id := fnd_request.submit_request(application => 'SQLGL'
,program => 'GLLEZL'
,description => NULL
,start_time => SYSDATE
,sub_request => FALSE
,argument1 => to_char(p_interface_run_id)
,argument2 => to_char(p_sob_id)
,argument3 => 'N'
,argument4 => NULL
,argument5 => NULL
,argument6 => 'N'
,argument7 => 'W');

...
END;