查看功能所放职责菜单
SELECT frv.responsibility_name,
f.menu_name,
fm.form_name,
ff.function_name,
ff.user_function_name,
fa.application_short_name
FROM fnd_menu_entries_vl ft, --菜单细节表
fnd_menus_vl f, --菜单表
fnd_form_functions_vl ff, --功能表
fnd_responsibility_vl frv, --职责表
fnd_application_vl fa,
fnd_form fm
WHERE ft.menu_id = f.menu_id --
AND ft.function_id = ff.function_id --
--AND ff.function_name LIKE '%XXZZCGWKS%' --
--AND ff.user_function_name = '&user_fnc_name' --
AND fm.form_name = 'CUX_HD_GL_CLASS'
-- and ft.function_id = '' --在EBS中可查
AND frv.menu_id = f.menu_id
AND fm.application_id = fa.application_id
AND fm.form_id = ff.form_id
AND ft.grant_flag = 'Y'
AND NOT EXISTS (SELECT 1
FROM fnd_resp_functions frf
WHERE frf.responsibility_id = frv.responsibility_id
AND frf.action_id = ff.function_id
AND frf.rule_type = 'F')
AND NOT EXISTS (SELECT 1
FROM fnd_compiled_menu_functions fcmf2, fnd_resp_functions frf
WHERE fcmf2.menu_id = frf.action_id
AND frf.rule_type = 'M'
AND frf.responsibility_id = frv.responsibility_id
AND fcmf2.function_id = ff.function_id)
UNION ALL
SELECT frv.responsibility_name,
f.menu_name,
fm.form_name,
ff.function_name,
ff.user_function_name,
fa.application_short_name
FROM fnd_compiled_menu_functions ft, --菜单追溯
fnd_menus_vl f, --菜单表
fnd_form_functions_vl ff, --功能表
fnd_responsibility_vl frv, --职责表
fnd_application_vl fa,
fnd_form fm
WHERE ft.menu_id = f.menu_id --
AND ft.function_id = ff.function_id --
--AND ff.function_name LIKE '%XXZZCGWKS%' --
-- AND ff.user_function_name = '&user_fnc_name' --
AND fm.form_name = 'CUX_HD_GL_CLASS'
-- and ft.function_id = '' --在EBS中可查
AND frv.menu_id = f.menu_id
AND fm.application_id = fa.application_id
AND fm.form_id = ff.form_id
AND ft.grant_flag = 'Y'
AND NOT EXISTS (SELECT 1
FROM fnd_resp_functions frf
WHERE frf.responsibility_id = frv.responsibility_id
AND frf.action_id = ff.function_id
AND frf.rule_type = 'F')
AND NOT EXISTS (SELECT 1
FROM fnd_compiled_menu_functions fcmf2, fnd_resp_functions frf
WHERE fcmf2.menu_id = frf.action_id
AND frf.rule_type = 'M'
AND frf.responsibility_id = frv.responsibility_id
AND fcmf2.function_id = ff.function_id)