Thursday, 14 March 2013
Query : Concurrent Program Request Status - For Specific Time Duration
SELECT main_prog.description Module
, fcr.hold_flag hold
, fcr.phase_code phase
, fcr.status_code status
, fcr.request_id
, fcr.parent_request_id parent_req_id
, TRUNC( ( NVL( fcr.actual_completion_date, SYSDATE ) - fcr.actual_start_date ) * 24 * 60, 2 ) time_in_mins
, fu.user_name
, fcpl.user_concurrent_program_name conc_program_name
, frl.responsibility_name
, fcr.requested_start_date req_start_date
, TO_CHAR( fcr.actual_start_date, 'DD-MON-YYYY HH:MI AM' ) start_date
, TO_CHAR( fcr.actual_completion_date, 'DD-MON-YYYY HH:MI AM' ) completion_date
, TRUNC( fcr.actual_start_date - fcr.requested_start_date, 2 ) kick_off_time
, fcrs.completion_text
, fcr.argument_text
, fcr.printer
, fcp.concurrent_program_id||'-'||fcp.concurrent_program_name conc_prog_id_code
, fcp.executable_id ||'-' ||fe.execution_method_code||'-'||fe.executable_name ID_CODE_NAME
, fe.execution_file_name
, fl.meaning execution_type
, fe.execution_file_path
, fcr.has_sub_request
, fcr.resubmitted
, fcr.resubmit_interval
, fu.description user_full_name
, fcr.outfile_name
, fcr.logfile_name
FROM apps.fnd_executables fe
, apps.fnd_concurrent_programs fcp
, apps.fnd_concurrent_programs_tl fcpl
, apps.fnd_concurrent_requests fcr
, apps.fnd_lookups fl
, apps.fnd_responsibility_tl frl
, apps.fnd_user fu
, apps.fnd_conc_req_summary_v fcrs
, apps.fnd_lookups main_prog
WHERE fe.executable_id = fcp.executable_id
AND fcp.execution_method_code = fe.execution_method_code
AND fcr.responsibility_application_id = frl.application_id
AND fcp.concurrent_program_id = fcr.concurrent_program_id
AND fcpl.concurrent_program_id = fcp.concurrent_program_id
AND frl.responsibility_id = fcr.responsibility_id
AND fu.user_id = fcr.requested_by
AND fl.lookup_code = fe.execution_method_code
AND fcrs.concurrent_program_id = fcr.concurrent_program_id
AND fcrs.request_id = fcr.request_id
AND fl.lookup_type = 'CP_EXECUTION_METHOD_CODE'
AND frl.language = 'US'
AND fcpl.language = 'US'
AND fcp.concurrent_program_name = main_prog.meaning(+)
AND main_prog.lookup_type(+) like 'REPORTERR'
--and fu.user_name = 'USER-IF-REQUIRED'
--and fcr.argument_text like '%Argument Content%'
--AND fcpl.user_concurrent_program_name like '%Any Program Name if Any%'
and fcr.actual_start_date <= to_date('08-Mar-2013 09:40:00','DD-MON-YYYY HH24:MI:SS')--To Time
and nvl(fcr.actual_completion_date,sysdate) >= to_date('08-Mar-2013 09:30:00','DD-MON-YYYY HH24:MI:SS') --From Time
ORDER BY fcr.actual_start_date desc,request_id desc
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment