Thursday, June 25, 2015

Query to Fetch Menu and Function of given Responsibility


SELECT fr.responsibility_id,
       frt.responsibility_name,
       fm.menu_id,
       fm.menu_name,
       fmt.user_menu_name,
       fmet.prompt,
       fme.sub_menu_id,
       (SELECT fmtsub.user_menu_name
          FROM fnd_menus fmsub, fnd_menus_tl fmtsub
         WHERE     fmsub.menu_id = fme.sub_menu_id
               AND fmtsub.menu_id = fmsub.menu_id
               AND fmtsub.language = 'US')
          sub_menu,
       fme.function_id,
       (SELECT ffft.user_function_name
          FROM fnd_form_functions fff, fnd_form_functions_tl ffft
         WHERE     fff.function_id = fme.function_id
               AND fff.function_id = ffft.function_id
               AND ffft.language = 'US')
          user_function_name
  FROM fnd_responsibility fr,
       fnd_responsibility_tl frt,
       fnd_menus fm,
       fnd_menus_tl fmt,
       fnd_menu_entries fme,
       fnd_menu_entries_tl fmet
 WHERE     fr.responsibility_id = frt.responsibility_id
       AND UPPER (frt.responsibility_name) = 'XXX HR EMPLOYEE SELF SERVICE'
       AND frt.language = 'US'
       AND fm.menu_id = fr.menu_id
       AND fm.menu_id = fmt.menu_id
       AND fmt.language = 'US'
       AND fm.menu_id = fme.menu_id
       AND fme.menu_id = fmet.menu_id
       AND fmet.language = 'US'

       AND fme.entry_sequence = fmet.entry_sequence

No comments:

Post a Comment