Friday, 15 November 2013

Script to find Concurrent Programs of a Request Set

 Provide Concurrent Program name to the following query.
It lists all the Request Sets which are created with the Concurrent Program given.



SELECT DISTINCT user_request_set_name
  FROM FND_REQUEST_SETS_TL
 WHERE request_set_id IN
          (SELECT request_set_id
             FROM FND_REQUEST_SET_PROGRAMS
            WHERE concurrent_program_id =
                     (SELECT CONCURRENT_PROGRAM_ID
                        FROM fnd_concurrent_programs_tl
                       WHERE upper(USER_CONCURRENT_PROGRAM_NAME) = upper(':Concurrent_prog_name')));


Provide the Request Set name to the following query.
It lists all concurrent programs of this Request Set.


SELECT USER_CONCURRENT_PROGRAM_NAME
  FROM fnd_concurrent_programs_tl
 WHERE CONCURRENT_PROGRAM_ID IN
          (SELECT concurrent_program_id
             FROM FND_REQUEST_SET_PROGRAMS
            WHERE request_set_id =
                     (SELECT request_set_id
                        FROM FND_REQUEST_SETS_TL
                       WHERE upper(user_request_set_name) = upper(':Request_Set_Name')));


SQL to get the request sets that can execute the required concurrent program

 SELECT frs.user_request_set_name "Request Set Name", frs.start_date_active "Request set Start Date",
       frs.end_date_active "Request set End Date", frsf.stage_name, frsf.user_stage_name, frsp.SEQUENCE "Stage Request Sequence",
       fcp.user_concurrent_program_name "Concurrent Program"
  FROM fnd_request_sets_vl frs, fnd_req_set_stages_form_v frsf, fnd_request_set_programs frsp, fnd_concurrent_programs_tl fcp
 WHERE frs.request_set_id = frsf.request_set_id
   AND frsf.request_set_stage_id = frsp.request_set_stage_id
   AND frsp.concurrent_program_id = fcp.concurrent_program_id
   AND fcp.user_concurrent_program_name = ':Concurrent_prog_name' 

No comments:

Post a Comment