Thursday, September 24, 2009

Query to get Request Group Details Responsibility wise:



SELECT   frg.request_group_name, fat1.application_name, frg.description,
         DECODE (frgu.request_unit_type,
                 'P', 'Program',
                 'S', 'Set',
                 'A', 'Application',
                 frgu.request_unit_type
                ) TYPE,
         DECODE (frgu.request_unit_type,
                 'P', fcpt.user_concurrent_program_name,
                 'S', frst.user_request_set_name,
                 'A', fat3.application_name,
                 frgu.request_unit_type
                ) NAME,
         fat2.application_name
    FROM fnd_request_groups frg,
         fnd_request_group_units frgu,
         fnd_concurrent_programs_tl fcpt,
         fnd_application_tl fat1,
         fnd_application_tl fat2,
         fnd_application_tl fat3,
         fnd_request_sets_tl frst
   WHERE frg.request_group_id = frgu.request_group_id
     AND frgu.request_unit_id = fcpt.concurrent_program_id(+)
     AND fcpt.LANGUAGE(+) = USERENV ('LANG')
     AND frg.application_id = fat1.application_id
     AND fat1.LANGUAGE(+) = USERENV ('LANG')
     AND frgu.unit_application_id = fat2.application_id
     AND fat2.LANGUAGE(+) = USERENV ('LANG')
     AND frgu.unit_application_id = fcpt.application_id(+)
     AND frgu.request_unit_id = frst.request_set_id(+)
     AND frst.LANGUAGE(+) = USERENV ('LANG')
     AND frgu.request_unit_id = fat3.application_id(+)
     AND fat3.LANGUAGE(+) = USERENV ('LANG')
     AND frgu.unit_application_id = frst.application_id(+)
     AND upper(fat1.application_name) = upper(:application_name)
ORDER BY request_group_name, frgu.request_unit_type, frgu.request_unit_id;


No comments:

Post a Comment