Monday, December 27, 2010

Query to find out Concurrent programs attached to request group

Query to find out Concurrent programs attached to request group
SELECT request_group_name,
       DECODE (request_unit_type,
               'A', 'Application',
               'P', 'Program',
               'S', 'Request Set',
               'no'
              ) request_unit_type,
       user_concurrent_program_name program_name
  FROM fnd_request_groups a,
       fnd_request_group_units b,
       fnd_concurrent_programs_vl c
 WHERE a.request_group_id = b.request_group_id
   AND b.request_unit_id = c.concurrent_program_id
   AND request_group_name = :request_group_name
   AND request_unit_type = 'P'
UNION
SELECT request_group_name,
       DECODE (request_unit_type,
               'A', 'Application',
               'P', 'Program',
               'S', 'Request Set',
               'no'
              ) request_unit_type,
       application_name program_name
  FROM fnd_request_groups a, fnd_request_group_units b, fnd_application_tl c
 WHERE a.request_group_id = b.request_group_id
   AND b.request_unit_id = c.application_id
   AND request_group_name = :request_group_name
   AND request_unit_type = 'A'
   AND LANGUAGE = 'US'
UNION
SELECT request_group_name,
       DECODE (request_unit_type,
               'A', 'Application',
               'P', 'Program',
               'S', 'Request Set',
               'no'
              ) request_unit_type,
       request_set_name program_name
  FROM fnd_request_groups a, fnd_request_group_units b, fnd_request_sets c
 WHERE a.request_group_id = b.request_group_id
   AND b.request_unit_id = c.request_set_id
   AND request_group_name = :request_group_name
   AND request_unit_type = 'S';

No comments:

Post a Comment