Thursday, January 2, 2025

Query to get Errored or Warning Concurrent Program Request details in R12

SELECT fu.user_name
      ,fcpt.user_concurrent_program_name
  ,fcpt.description
  ,fcp.concurrent_program_name
  ,fcr.request_id
  ,((fcr.actual_completion_date
         -DECODE (TRUNC(fcr.request_date)
         ,fcr.requested_start_date
,fcr.request_date
,fcr.requested_start_date
))*60*24) wait_time_min
      ,DECODE(fcr.phase_code,'C','Completed'
                        ,'R','Running'
,fcr.phase_code
) phase_code
  ,DECODE(fcr.status_code,'C','Completed'
                         ,'R','Running'
,'W','Paused'
,'E','Error'
,'G','Warning'
,fcr.status_code
) status_code
  ,TO_CHAR(fcr.request_date,'DD/MM/YYYY HH24:MI:SS') request_date
  ,TO_CHAR(fcr.requested_start_date,'DD/MM/YYYY HH24:MI:SS') start_time
  ,TO_CHAR(fcr.actual_completion_date,'DD/MM/YYYY HH24:MI:SS') complete_time
  FROM fnd_concurrent_requests fcr
      ,fnd_concurrent_programs fcp
  ,fnd_concurrent_programs_tl fcpt
  ,fnd_user fu
 WHERE 1=1
   AND fcp.concurrent_program_id=fcr.concurrent_program_id
   AND fcpt.concurrent_program_id=fcp.concurrent_program_id
   AND fcr.requested_by = fu.user_id
   AND TRUNC(fcr.request_date) BETWEEN SYSDATE - 5 AND SYSDATE
   AND fcr.status_code IN ('E','G')
ORDER BY fcr.status_code
        ,fcp.concurrent_program_name
,fcr.request_id

No comments:

Post a Comment

Query to get Parent and Child Accounts in Oracle APPS R12

SELECT ffv1.flex_value parent_account       ,ffvt1.description parent_account_desc   ,ffv2.flex_value child_account   ,ffvt2.description...