SQL query to get all request stages of request set with Executable details in oracle apps


Run the below query and enter the Request Set Name

SELECT 
      rs.user_request_set_name request_set_name,
      rss.display_sequence SEQUENCE,
      cp.concurrent_program_id,
      cp.user_concurrent_program_name concurrent_program_name,
      e.EXECUTABLE_NAME,
      e.execution_file_name,
      lv.meaning file_type,
      fat.application_name 
FROM 
      apps.fnd_request_sets_vl rs,
      apps.fnd_req_set_stages_form_v rss,
      applsys.fnd_request_set_programs rsp,
      apps.fnd_concurrent_programs_vl cp,
      apps.fnd_executables e,
      apps.fnd_lookup_values lv,
      apps.fnd_application_tl fat
WHERE 
      1=1
      AND rs.application_id             = rss.set_application_id
      AND rs.request_set_id             = rss.request_set_id
      AND rs.user_request_set_name      = '&request_set_name'  --enter request set name
      AND e.APPLICATION_ID              = FAT.APPLICATION_ID
      AND rss.set_application_id        = rsp.set_application_id
      AND rss.request_set_id            = rsp.request_set_id
      AND rss.request_set_stage_id      = rsp.request_set_stage_id
      AND rsp.program_application_id    = cp.application_id
      AND rsp.concurrent_program_id     = cp.concurrent_program_id
      AND cp.executable_id              = e.executable_id
      AND cp.executable_application_id  = e.application_id
AND cp.executable_application_id = e.application_id AND lv.lookup_type = 'CP_EXECUTION_METHOD_CODE' AND lv.lookup_code = e.execution_method_code AND lv.language = 'US' AND fat.language = 'US' and rs.end_date_active is null ORDER BY 1,2;



SELECT 
    A.request_set_id,
    B.REQUEST_SET_STAGE_ID,
    A.USER_REQUEST_SET_NAME,
    c.concurrent_program_id,
    C.USER_CONCURRENT_PROGRAM_NAME,
    e.executable_name,
    E.EXECUTION_FILE_NAME,
    E.EXECUTION_METHOD_CODE,
    E.EXECUTION_FILE_NAME,
    E.EXECUTION_METHOD_CODE,
    E.application_id executable_appl_id,
    (   SELECT  application_name 
        FROM    fnd_application_tl 
        WHERE   application_id  = E.application_id 
    ) application_name
FROM 
    apps.FND_REQUEST_SETS_TL A,
    apps.FND_REQUEST_SET_PROGRAMS B,
    apps.fnd_concurrent_programs_tl C,
    apps.fnd_concurrent_programs D,
    apps.fnd_executables E
WHERE 1=1
    AND a.request_set_id        = b.request_set_id
    AND b.concurrent_program_id = c.concurrent_program_id
    AND c.concurrent_program_id = d.concurrent_program_id
    AND d.executable_id         = e.executable_id
    AND e.application_id        = d.executable_application_id
    AND (A.USER_REQUEST_SET_NAME) LIKE '%'   ||:RequestSetName   ||'%'
ORDER BY 
    b.REQUEST_SET_STAGE_ID;

Comments