SELECT DISTINCT
fcr.request_id,
fcr.actual_start_date,
fcr.actual_completion_date,
FLOOR (
( (fcr.actual_completion_date - fcr.actual_start_date)
* 24
* 60
* 60)
/ 3600)
HOURS,
FLOOR (
( ( (fcr.actual_completion_date - fcr.actual_start_date)
* 24
* 60
* 60)
- FLOOR (
( (fcr.actual_completion_date - fcr.actual_start_date)
* 24
* 60
* 60)
/ 3600)
* 3600)
/ 60)
MINUTES,
ROUND (
( ( (fcr.actual_completion_date - fcr.actual_start_date)
* 24
* 60
* 60)
- FLOOR (
( (fcr.actual_completion_date - fcr.actual_start_date)
* 24
* 60
* 60)
/ 3600)
* 3600
- ( FLOOR (
( ( ( fcr.actual_completion_date
- fcr.actual_start_date)
* 24
* 60
* 60)
- FLOOR (
( ( fcr.actual_completion_date
- fcr.actual_start_date)
* 24
* 60
* 60)
/ 3600)
* 3600)
/ 60)
* 60)))
SECS,
DECODE (fcr.phase_code,
'C', 'Completed',
'I', 'Inactive',
'P', 'Pending',
'R', 'Running',
'N/A')
phase_code,
DECODE (fcr.status_code,
'A', 'Waiting',
'B', 'Resuming',
'C', 'Normal',
'D', 'Cancelled',
'E', 'Errored',
'F', 'Scheduled',
'G', 'Warning',
'H', 'On Hold',
'I', 'Normal',
'M', 'No Manager',
'Q', 'Standby',
'R', 'Normal',
'S', 'Suspended',
'T', 'Terminating',
'U', 'Disabled',
'W', 'Paused',
'X', 'Terminated',
'Z', 'Waiting',
'N/A')
status_code,
fcr.outfile_name,
fcr.number_of_arguments,
fcr.argument_text,
frt.responsibility_name,
fav.application_name,
fav.application_short_name appl_short_name,
fu.user_name,
fu.description user_description,
fu.start_date user_start_date,
fcp.user_concurrent_program_name,
fcp.concurrent_program_name short_name,
fe.executable_name,
DECODE (fe.execution_method_code,
'B', 'Request Set Stage Function',
'Q', 'SQL*Plus',
'H', 'Host',
'L', 'SQL*Loader',
'A', 'Spawned',
'I', 'PL/SQL Stored Procedure',
'P', 'Oracle Reports',
'S', 'Immediate',
'N/A')
execution_method,
fe.execution_file_name
FROM apps.fnd_concurrent_requests fcr,
apps.fnd_user fu,
apps.fnd_application_vl fav,
apps.fnd_responsibility_tl frt,
apps.fnd_concurrent_programs_vl fcp,
apps.fnd_executables fe
WHERE fcr.requested_by = fu.user_id
AND fcr.concurrent_program_id = fcp.concurrent_program_id
AND fcr.responsibility_id = frt.responsibility_id
AND fcr.responsibility_application_id = fav.application_id
AND fcp.executable_id = fe.executable_id
AND NVL ( :P_Requested_by, fu.user_name) = fu.user_name
AND NVL ( :request_id, fcr.request_id) = fcr.request_id
AND NVL ( :P_concurrent_program_name,
fcp.user_concurrent_program_name) =
fcp.user_concurrent_program_name;
No comments:
Post a Comment