SELECT LPAD(‘ ‘, 6 * (LEVEL – 1)) || menu_entry.entry_sequence sequence,
LPAD(‘ ‘, 6 * (LEVEL – 1)) || menu.user_menu_name SubMenu_Descrition,
LPAD(‘ ‘, 6 * (LEVEL – 1)) || func.user_function_name Function_Description,
menu.menu_id,
func.function_id,
menu_entry.grant_flag Grant_Flag,
DECODE(menu_entry.sub_menu_id,
null,
‘FUNCTION’,
DECODE(menu_entry.function_id, null, ‘SUBMENU’, ‘BOTH’)) Type
FROM fnd_menu_entries menu_entry,
fnd_menus_vl menu,
fnd_form_functions_vl func
WHERE 1 = 1
AND menu_entry.sub_menu_id = menu.menu_id(+)
AND menu_entry.function_id = func.function_id(+)
AND grant_flag = ‘Y’
START WITH menu_entry.menu_id =
(SELECT menu_id
FROM fnd_menus_tl menu2
WHERE menu2.user_menu_name = ‘FIN_GL_MANAGER’–根据自己实际情况替换
and menu2.language = ‘ZHS’)
CONNECT BY menu_entry.menu_id = PRIOR menu_entry.sub_menu_id
ORDER SIBLINGS BY menu_entry.entry_sequence;