-
Need to determine if request set running and parameters
I can query table FND_CONCURRENT_REQUESTS to determine if a certain request step is running.
Code:
select description, status_code, number_of_arguments, argument1, argument2, argument3, argument4
from FND_CONCURRENT_REQUESTS
where description = 'XYZ_YEAR_END_GL_VERIFY (30)'
and status_code != 'C'
but the columns like 'argument#" do not seem to coorespond to concurrent request parameter values.
I need to be able to determine if a certain concurrent request is running and the value of certain input parameters (ORG_ID, SOB_ID), in my case the parameter I am interested in is the first one defined under "Program", "Define", then query executable, then select "Parameters".
I want to programatically prevent this procedure from running with the same input criteria simultaneously.
Has anyone done this? Help!
Last edited by wrwelden; 07-24-2007 at 04:13 PM.
-
This might be helpful to someone as a starting point
We opted for a custom table to satisfy the requirement but this may be helpful to someone
Code:
SELECT /*+ ORDERED */
reqs.request_id, reqs.requested_start_date requested_start_date,
reqs.phase_code,
DECODE (reqs.phase_code,
'P', 'PENDING',
'R', 'RUNNING',
'C', 'COMPLETED',
reqs.phase_code
) phase_code_txt,
reqs.status_code,
DECODE (reqs.status_code,
'D', 'CANCELLED',
'Q', 'SCHEDULED',
'I', 'SCHEDULED',
'R', 'RUNNING',
'X', 'TERMINATED',
'E', 'ERROR',
'C', 'COMPLETED NORMAL',
reqs.status_code
) status_code_txt,
reqs.hold_flag, reqs.cancel_or_hold, usr.user_name,
prg.user_concurrent_program_name prg_name, argument_text args,
SUBSTR (argument_text, 1, INSTR (argument_text, ',') - 1) arg1
FROM apps.fnd_user usr,
apps.fnd_concurrent_requests reqs,
apps.fnd_concurrent_programs_tl prg
WHERE reqs.phase_code IN ('P', 'R')
-- and reqs.request_id = 20234093
AND reqs.concurrent_program_id = prg.concurrent_program_id
AND prg.user_concurrent_program_name LIKE
'%'
--'%XYZ_PRE_CLOSING_GL_EXTRACT%'
AND reqs.requested_by = usr.user_id
ORDER BY DECODE (reqs.phase_code, 'R', 1, 2),
reqs.requested_start_date,
usr.user_name;
wrwelden
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|