If we need to find the Concurrent Program previous\past\history execution details then the below query will be useful.
Script:
select request_id, phase_code, status_code ,
to_char(requested_start_date, 'DD-MM-YY hh24:mi:ss') "Requested start date",
to_char(actual_start_date, 'DD-MM-YY hh24:mi:ss') "Actually started date",
to_char(actual_completion_date,'DD-MM-YY hh24:mi:ss') "Actually completed date",
substr(ARGUMENT_TEXT,1,100) Parameter_Passed ,
TRUNC (MOD ((nvl(cr.actual_completion_date,sysdate) - cr.actual_start_date) * 24,
24
)
) "Hr",
TRUNC (MOD ( (nvl(cr.actual_completion_date,sysdate) - cr.actual_start_date)
* 24
* 60,
60
)
) "Mins",
TRUNC (MOD ( (nvl(cr.actual_completion_date,sysdate) - cr.actual_start_date)
* 24
* 60
* 60,
60
)
) "Sec"
from fnd_concurrent_requests cr where concurrent_program_id in
( select concurrent_program_id
from fnd_concurrent_programs
where concurrent_program_name = '&prog_short_name' )
and actual_start_date>sysdate - &noofdaysago
order by phase_code,actual_start_date asc
or
select distinct * from (select request_id, phase_code, status_code ,
to_char(requested_start_date, 'DD-MM-YY hh24:mi:ss') "Requested start",
to_char(actual_start_date, 'DD-MM-YY hh24:mi:ss') "Actually started",
to_char(actual_completion_date,'DD-MM-YY hh24:mi:ss') "Actually completed"
,TRUNC (MOD ((nvl(cr.actual_completion_date,sysdate) - cr.actual_start_date) * 24,
24
)
) "Hr",
TRUNC (MOD ( (nvl(cr.actual_completion_date,sysdate) - cr.actual_start_date)
* 24
* 60,
60
)
) "Mi",
TRUNC (MOD ( (nvl(cr.actual_completion_date,sysdate) - cr.actual_start_date)
* 24
* 60
* 60,
60
)
) "Sec"
,trim(cr.argument_text) arguments,
r.responsibility_name
from apps.fnd_concurrent_requests cr,apps.fnd_responsibility_tl r where cr.concurrent_program_id =
( select concurrent_program_id
from apps.fnd_concurrent_programs_tl
where user_concurrent_program_name like 'Launch Supply Chain Planning Process'
and language='US')
--and actual_start_date >sysdate -7
--and cr.argument_text like '%MPS-ATP%'
--and phase_code='P'
--and status_code='X'
and cr.responsibility_application_id = r.application_id
and cr.responsibility_id = r.responsibility_id
--and request_id=210692360
and language='US'
order by actual_start_date desc)
/
1 Comments
You have really shared a informative blog post
ReplyDeletePost a Comment