Execution of the concurrent requests

--
-- List details of a Concurrent Program that has executed.
--
SELECT fcpt.user_concurrent_program_name
       ,fu.user_name
       ,fcr.request_id
       ,fcr.actual_start_date
       ,fcr.actual_completion_date
  FROM fnd_concurrent_programs_tl fcpt
       ,fnd_concurrent_requests fcr
       ,fnd_user fu
 WHERE fcpt.user_concurrent_program_name = :v_program_name
   AND fcr.requested_by = fu.user_id
   AND fcpt.concurrent_program_id = fcr.concurrent_program_id
 ORDER BY fcr.actual_start_date desc
--
--  how many times a Concurrent Program has been executed
--
SELECT fcpt.user_concurrent_program_name
       ,fu.user_name
       ,count(fcr.concurrent_program_id)
  FROM fnd_concurrent_programs_tl fcpt
       ,fnd_concurrent_requests fcr
       ,fnd_user fu
 WHERE fcpt.user_concurrent_program_name = :v_conc_program
   AND fcr.requested_by = fu.user_id
   AND fcpt.concurrent_program_id = fcr.concurrent_program_id
 GROUP BY fcpt.user_concurrent_program_name
       ,fu.user_name
       ,fcr.concurrent_program_id;
--
-- Running requests:
--
SELECT fcr.request_id
       ,fcr.requested_by
       ,fcr.phase_code
       ,fcr.status_code
       ,fcpt.user_concurrent_program_name
  FROM fnd_concurrent_requests fcr
       ,fnd_concurrent_programs_tl fcpt
 WHERE fcr.concurrent_program_id = fcpt.concurrent_program_id
   AND fcr.phase_code = 'R';
Requests started in the last hour:
col user_name format a20
col user_concurrent_program_name format a20
SELECT fcr.request_id
       ,fcpt.user_concurrent_program_name
       ,fu.user_name
       ,fcr.phase_code
       ,fcr.status_code
       ,to_char(fcr_actual_start_date,'MON DD HH24:MI:SS') actual_start_date
       ,to_char(fcr.actual_completion_date,'MON DD HH24:MI:SS') actual_comp_date
       ,fcr.completion_text
  FROM fnd_concurrent_requests fcr
       ,fnd_concurrent_programs_tl fcpt
       ,fnd_user fu
 WHERE fcr.concurrent_program_id = fcpt.concurrent_program_id
   AND fcr.requested_by = fu.user_id
   AND fcr.request_date > SYSDATE - 60/1440;
-------------------------------------------------------------------------------------------------------
To know the concurrent program attached to which req group:
-----------------------------------------------------------
SELECT DISTINCT FCPL.USER_CONCURRENT_PROGRAM_NAME,
FCP.CONCURRENT_PROGRAM_NAME,
FAPP.APPLICATION_NAME,
FRG.REQUEST_GROUP_NAME,
FNRTL.RESPONSIBILITY_NAME
FROM APPS.FND_REQUEST_GROUPS FRG,
APPS.FND_APPLICATION_TL FAPP,
APPS.FND_REQUEST_GROUP_UNITS FRGU,
APPS.FND_CONCURRENT_PROGRAMS FCP,
APPS.FND_CONCURRENT_PROGRAMS_TL FCPL,
APPS.FND_RESPONSIBILITY FNR,
APPS.FND_RESPONSIBILITY_TL FNRTL
WHERE FRG.APPLICATION_ID = FAPP.APPLICATION_ID
AND FRG.APPLICATION_ID = FRGU.APPLICATION_ID
AND FRG.REQUEST_GROUP_ID = FRGU.REQUEST_GROUP_ID
AND FRG.REQUEST_GROUP_ID = FNR.REQUEST_GROUP_ID
AND FRG.APPLICATION_ID = FNR.APPLICATION_ID
AND FNR.RESPONSIBILITY_ID = FNRTL.RESPONSIBILITY_ID
AND FRGU.REQUEST_UNIT_ID = FCP.CONCURRENT_PROGRAM_ID
AND FRGU.UNIT_APPLICATION_ID = FCP.APPLICATION_ID
AND FCP.CONCURRENT_PROGRAM_ID = FCPL.CONCURRENT_PROGRAM_ID
AND FCPL.USER_CONCURRENT_PROGRAM_NAME LIKE 'CPGF ONT Sales Order Acknowledgment Report'--'CPGF ONT Sales Order Acknowledgment Report' --'CPGF WMS Transplace Data Feed'
--'CPGF ONT Sales Order Acknowledgment Report'--'CPGF WMS Transplace Data Feed'--'CPGF ONT Order Backlog Report'
--AND FCPL.description like '%CPGF%WMS%Trans%Data%Feed%'--'CPGF ONT Order Backlog Report'
AND FNRTL.LANGUAGE = 'US'
AND FAPP.LANGUAGE = 'US';

No comments:

Post a Comment

Oracle Application Story

Oracle Application Story :- ----------------------------- This article is design to explain what's all about the Ora...