SELECT frtl.responsibility_name,
fr.responsibility_key,
fm.menu_id,
fm.menu_name,
menu.function_id,
menu.prompt,
fffv.user_function_name,
fffv.function_name,
fffv.TYPE
FROM ( SELECT CONNECT_BY_ROOT fmet.menu_id top_menu_id,
fmet.menu_id menu_id,
fmet.sub_menu_id,
fmet.function_id,
fmet.prompt
FROM apps.fnd_menu_entries_vl fmet
CONNECT BY PRIOR fmet.sub_menu_id = fmet.menu_id
AND PRIOR fmet.prompt IS NOT NULL) menu,
apps.fnd_responsibility fr,
apps.fnd_responsibility_tl frtl,
apps.fnd_menus fm,
apps.fnd_form_functions_vl fffv
WHERE fr.menu_id = menu.top_menu_id
AND fffv.function_id = menu.function_id
AND fffv.TYPE <> 'SUBFUNCTION'
AND menu.function_id IS NOT NULL
AND menu.prompt IS NOT NULL
AND fm.menu_id = menu.menu_id
AND frtl.responsibility_id = fr.responsibility_id
AND NVL ( :REsponsibility_name, frtl.responsibility_name) =
frtl.responsibility_name
AND NVL ( :Function_name, fffv.function_name) = fffv.function_name
AND menu.function_id NOT IN (SELECT ffvl.function_id
FROM apps.fnd_resp_functions frf,
applsys.fnd_responsibility_tl frt,
apps.fnd_form_functions_vl ffvl
WHERE frf.responsibility_id =
frt.responsibility_id
AND frf.action_id =
ffvl.function_id
AND frf.rule_type = 'F'
AND frt.responsibility_name =
frtl.responsibility_name)
AND menu.menu_id NOT IN (SELECT fmv.menu_id
FROM apps.fnd_resp_functions frf,
applsys.fnd_responsibility_tl frt,
apps.fnd_menus_vl fmv
WHERE frf.responsibility_id =
frt.responsibility_id
AND frf.action_id = fmv.menu_id
AND frf.rule_type = 'M'
AND frt.responsibility_name =
frtl.responsibility_name)
ORDER BY fffv.user_function_name;
fr.responsibility_key,
fm.menu_id,
fm.menu_name,
menu.function_id,
menu.prompt,
fffv.user_function_name,
fffv.function_name,
fffv.TYPE
FROM ( SELECT CONNECT_BY_ROOT fmet.menu_id top_menu_id,
fmet.menu_id menu_id,
fmet.sub_menu_id,
fmet.function_id,
fmet.prompt
FROM apps.fnd_menu_entries_vl fmet
CONNECT BY PRIOR fmet.sub_menu_id = fmet.menu_id
AND PRIOR fmet.prompt IS NOT NULL) menu,
apps.fnd_responsibility fr,
apps.fnd_responsibility_tl frtl,
apps.fnd_menus fm,
apps.fnd_form_functions_vl fffv
WHERE fr.menu_id = menu.top_menu_id
AND fffv.function_id = menu.function_id
AND fffv.TYPE <> 'SUBFUNCTION'
AND menu.function_id IS NOT NULL
AND menu.prompt IS NOT NULL
AND fm.menu_id = menu.menu_id
AND frtl.responsibility_id = fr.responsibility_id
AND NVL ( :REsponsibility_name, frtl.responsibility_name) =
frtl.responsibility_name
AND NVL ( :Function_name, fffv.function_name) = fffv.function_name
AND menu.function_id NOT IN (SELECT ffvl.function_id
FROM apps.fnd_resp_functions frf,
applsys.fnd_responsibility_tl frt,
apps.fnd_form_functions_vl ffvl
WHERE frf.responsibility_id =
frt.responsibility_id
AND frf.action_id =
ffvl.function_id
AND frf.rule_type = 'F'
AND frt.responsibility_name =
frtl.responsibility_name)
AND menu.menu_id NOT IN (SELECT fmv.menu_id
FROM apps.fnd_resp_functions frf,
applsys.fnd_responsibility_tl frt,
apps.fnd_menus_vl fmv
WHERE frf.responsibility_id =
frt.responsibility_id
AND frf.action_id = fmv.menu_id
AND frf.rule_type = 'M'
AND frt.responsibility_name =
frtl.responsibility_name)
ORDER BY fffv.user_function_name;
No comments:
Post a Comment