This content has been marked as final. Show 3 replies
I have been able to use fnd_global.apps_initialize in both SQL Developer 1.0 and 1.1.
When you say that it does not work, what do you mean?
I have a piece of code that fires off a pile of concurrent requests. Under SQL developer the request id is always zero (i.e. a request is not created) but under Toad it is fine. Some one else in my Company has a similar issue. Any ideas?
fnd_global.apps_initialize (111,111,111); -- prod
FOR i IN 10670 .. 10675 LOOP
(application => 'INV',
-- application short name
program => 'INV_ITEM_CAT_ASSIGN_OI',
-- program short name
argument1 => i,
argument2 => 1,
argument3 => 1);
--dbms_output.put_line('Req ' || p_requestid);
I use the following and I can successfully submit a concurrent request:
fnd_global.apps_initialize(1234, 20419, 0);
l_req_id := fnd_request.submit_request(application => 'FND',
program => 'FNDCPPGD',
argument1 => 'FND',
argument2 => 'FNDCPPGD');
This submits the "Concurrent Program Details Report" concurrent program within the "Application Developer" responsibility as user ID 1234 - reporting on itself, just for the sake of passing something in the parameters.
I would put some debugs after the apps initialize to make sure that the values are set properly (ie fnd_global.user_id, resp_id, resp_appl_id). I assume that the IDs are right as it works in TOAD, but worth a check.
Do you get a result from FND_RESPONSIBILITY_VL for the responsibility id? I have had some issues with userenv('LANG') not being set correctly (ie returns GB, but only have US translations for Apps), and I don't know whether that would affect submitting requests.
Apart from that, no other suggestions leap to mind.