-- Concurrent Request Status
SELECT a.request_id,
a.user_concurrent_program_name,
a.requestor,
d.description,
SUBSTR(a.completion_text,1,20) status,
a.request_date,
a.actual_start_date,
a.actual_completion_date ,
DECODE(a.STATUS_CODE, 'A', 'Waiting','B', 'Resuming','C', 'Normal','D', 'Cancelled','E', 'Error','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') cp_status,
DECODE(a.PHASE_CODE, 'C', 'Completed','I', 'Inactive', 'P', 'Pending','R', 'Running') PHASE,
mod( TRUNC( ( a.actual_completion_date - a.actual_start_date ) * 24 ), 24) HOURS ,
mod( TRUNC( ( a.actual_completion_date - a.actual_start_date ) * 1440 ), 60 ) MINUTES,
mod( TRUNC( ( a.actual_completion_date - a.actual_start_date ) * 86400 ), 60 ) SECONDS,
( a.actual_completion_date - a.actual_start_date ) * 24 * 60 * 60 total_seconds,
a.argument_text,
a.hold_flag,
a.program_short_name,
-- b.logfile_name,
-- b.logfile_node_name,
-- b.outfile_name,
-- b.outfile_node_name ,
a.responsibility_id,
c.responsibility_name,
a.responsibility_application_id,
-- c.description,
fav.application_short_name,
fav.application_name,
fnd_profile.VALUE_SPECIFIC(NAME => 'GL_SET_OF_BKS_ID', USER_ID => NULL, RESPONSIBILITY_ID => a.responsibility_id, APPLICATION_ID => a.responsibility_application_id, ORG_ID => NULL, SERVER_ID => NULL) GL_Set_of_Books_id,
fnd_profile.VALUE_SPECIFIC(NAME => 'GL_SET_OF_BKS_NAME', USER_ID => NULL, RESPONSIBILITY_ID => a.responsibility_id, APPLICATION_ID => a.responsibility_application_id, ORG_ID => NULL, SERVER_ID => NULL) GL_Set_of_Books_Name,
fnd_profile.VALUE_SPECIFIC(NAME => 'ORG_ID', USER_ID => NULL, RESPONSIBILITY_ID => a.responsibility_id, APPLICATION_ID => a.responsibility_application_id, ORG_ID => NULL, SERVER_ID => NULL) org_id_profile,
(Select name from hr_operating_units where organization_id = (fnd_profile.VALUE_SPECIFIC(NAME => 'ORG_ID', USER_ID => NULL, RESPONSIBILITY_ID => a.responsibility_id, APPLICATION_ID => a.responsibility_application_id, ORG_ID => NULL, SERVER_ID => NULL))) operating_unit_name
-- a.phase_code,
-- a.status_code
FROM apps.fnd_conc_req_summary_v a,
apps.fnd_concurrent_requests b,
apps.fnd_responsibility_vl c,
fnd_user d,
fnd_application_vl fav
WHERE 1 = 1
AND a.responsibility_id = c.responsibility_id
AND a.request_id = b.request_id
AND b.requested_by = d.user_id
AND fav.application_id = a.responsibility_application_id
AND a.user_concurrent_program_name = <Concurrent Program Name>
--'Workflow%Back%'-- --'Workflow Directory Services User/Role Validation'-- --'CII IPCM Insert Transactions' -- --'CGT Test Certificate Report' -- --'CGT 2111 Staging Updation'--'CGT Test Certificate Report'
--and (a.user_concurrent_program_name <> 'Workflow Background Process' or a.user_concurrent_program_name <> 'OAM Applications Dashboard Collection' )
---AND A.argument_text like '%RM0281-12232011%'
--and trunc(a.actual_start_date) = '08-Feb-2013'
--and to_char(a.actual_start_date,'dd-mon-rrrr hh24:mi:ss') between '08-feb-2013 19:00:00' and '08-feb-2013 23:00:00'
-- AND A.request_id = 81567639--BETWEEN 4740415 AND 4740424
--AND A.request_id in ('')-- Concurrent Request Status
--AND a.argument_text LIKE '%489742%'
--and responsibility_name = 'XPOS Custom Applications'
--and a.requestor = 'KC807'
--and a.STATUS_CODE = 'R'
--ORDER BY a.request_id DESC;
;
SELECT a.request_id,
a.user_concurrent_program_name,
a.requestor,
d.description,
SUBSTR(a.completion_text,1,20) status,
a.request_date,
a.actual_start_date,
a.actual_completion_date ,
DECODE(a.STATUS_CODE, 'A', 'Waiting','B', 'Resuming','C', 'Normal','D', 'Cancelled','E', 'Error','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') cp_status,
DECODE(a.PHASE_CODE, 'C', 'Completed','I', 'Inactive', 'P', 'Pending','R', 'Running') PHASE,
mod( TRUNC( ( a.actual_completion_date - a.actual_start_date ) * 24 ), 24) HOURS ,
mod( TRUNC( ( a.actual_completion_date - a.actual_start_date ) * 1440 ), 60 ) MINUTES,
mod( TRUNC( ( a.actual_completion_date - a.actual_start_date ) * 86400 ), 60 ) SECONDS,
( a.actual_completion_date - a.actual_start_date ) * 24 * 60 * 60 total_seconds,
a.argument_text,
a.hold_flag,
a.program_short_name,
-- b.logfile_name,
-- b.logfile_node_name,
-- b.outfile_name,
-- b.outfile_node_name ,
a.responsibility_id,
c.responsibility_name,
a.responsibility_application_id,
-- c.description,
fav.application_short_name,
fav.application_name,
fnd_profile.VALUE_SPECIFIC(NAME => 'GL_SET_OF_BKS_ID', USER_ID => NULL, RESPONSIBILITY_ID => a.responsibility_id, APPLICATION_ID => a.responsibility_application_id, ORG_ID => NULL, SERVER_ID => NULL) GL_Set_of_Books_id,
fnd_profile.VALUE_SPECIFIC(NAME => 'GL_SET_OF_BKS_NAME', USER_ID => NULL, RESPONSIBILITY_ID => a.responsibility_id, APPLICATION_ID => a.responsibility_application_id, ORG_ID => NULL, SERVER_ID => NULL) GL_Set_of_Books_Name,
fnd_profile.VALUE_SPECIFIC(NAME => 'ORG_ID', USER_ID => NULL, RESPONSIBILITY_ID => a.responsibility_id, APPLICATION_ID => a.responsibility_application_id, ORG_ID => NULL, SERVER_ID => NULL) org_id_profile,
(Select name from hr_operating_units where organization_id = (fnd_profile.VALUE_SPECIFIC(NAME => 'ORG_ID', USER_ID => NULL, RESPONSIBILITY_ID => a.responsibility_id, APPLICATION_ID => a.responsibility_application_id, ORG_ID => NULL, SERVER_ID => NULL))) operating_unit_name
-- a.phase_code,
-- a.status_code
FROM apps.fnd_conc_req_summary_v a,
apps.fnd_concurrent_requests b,
apps.fnd_responsibility_vl c,
fnd_user d,
fnd_application_vl fav
WHERE 1 = 1
AND a.responsibility_id = c.responsibility_id
AND a.request_id = b.request_id
AND b.requested_by = d.user_id
AND fav.application_id = a.responsibility_application_id
AND a.user_concurrent_program_name = <Concurrent Program Name>
--'Workflow%Back%'-- --'Workflow Directory Services User/Role Validation'-- --'CII IPCM Insert Transactions' -- --'CGT Test Certificate Report' -- --'CGT 2111 Staging Updation'--'CGT Test Certificate Report'
--and (a.user_concurrent_program_name <> 'Workflow Background Process' or a.user_concurrent_program_name <> 'OAM Applications Dashboard Collection' )
---AND A.argument_text like '%RM0281-12232011%'
--and trunc(a.actual_start_date) = '08-Feb-2013'
--and to_char(a.actual_start_date,'dd-mon-rrrr hh24:mi:ss') between '08-feb-2013 19:00:00' and '08-feb-2013 23:00:00'
-- AND A.request_id = 81567639--BETWEEN 4740415 AND 4740424
--AND A.request_id in ('')-- Concurrent Request Status
--AND a.argument_text LIKE '%489742%'
--and responsibility_name = 'XPOS Custom Applications'
--and a.requestor = 'KC807'
--and a.STATUS_CODE = 'R'
--ORDER BY a.request_id DESC;
;
No comments:
Post a Comment