EBS 找出昨天執行的Concurrent Request狀態是Error、Warning的SQL

select  fcr.request_id,
             fcr.request_date,
             decode(fcr.status_code,'E','Error','G','Warning') status,
             decode(FCR.phase_code,'R','Running','C','Completed','P','Pending','I','Inactive') phase,
             (select user_name from fnd_user where user_id=fcr.requested_by)  "user",
              FCP.user_concurrent_program_name "program name",
              fcr.argument_text "argument",
              fcr.completion_text "completion"
    from FND_CONCURRENT_REQUESTS FCR,
              FND_CONCURRENT_PROGRAMS_TL FCP
    where FCR.concurrent_program_id=FCP.concurrent_program_id
    and trunc(fcr.request_date) = trunc(sysdate -1)
    and  (FCR.status_code='E'   or  FCR.status_code='G')  ;