/* Formatted on 6/9/2014 9:34:16 AM (QP5 v5.115.810.9015) */
SELECT NVL2 (fme.sub_menu_id, '+', '-')
|| LPAD (NVL ( (SELECT prompt
FROM apps.fnd_menu_entries_vl
WHERE menu_id = fme.menu_id
AND sub_menu_id = fme.sub_menu_id
AND fme.function_id IS NULL),
(SELECT prompt
FROM apps.fnd_menu_entries_vl
WHERE menu_id = fme.menu_id
AND function_id = fme.function_id
AND fme.sub_menu_id IS NULL)
),
LENGTH (NVL ( (SELECT prompt
FROM apps.fnd_menu_entries_vl
WHERE menu_id = fme.menu_id
AND sub_menu_id = fme.sub_menu_id
AND fme.function_id IS NULL),
(SELECT prompt
FROM apps.fnd_menu_entries_vl
WHERE menu_id = fme.menu_id
AND function_id = fme.function_id
AND fme.sub_menu_id IS NULL)
)
)
+ (LEVEL * 5),
'-'
)
tree_structure
FROM apps.fnd_menu_entries fme
START WITH fme.menu_id =
(SELECT menu_id
FROM apps.fnd_responsibility fr, apps.fnd_responsibility_tl frt
WHERE fr.responsibility_id = frt.responsibility_id
AND frt.responsibility_name = :responsibility_name) -- 'Application Developer'
CONNECT BY PRIOR fme.sub_menu_id = fme.menu_id
SELECT NVL2 (fme.sub_menu_id, '+', '-')
|| LPAD (NVL ( (SELECT prompt
FROM apps.fnd_menu_entries_vl
WHERE menu_id = fme.menu_id
AND sub_menu_id = fme.sub_menu_id
AND fme.function_id IS NULL),
(SELECT prompt
FROM apps.fnd_menu_entries_vl
WHERE menu_id = fme.menu_id
AND function_id = fme.function_id
AND fme.sub_menu_id IS NULL)
),
LENGTH (NVL ( (SELECT prompt
FROM apps.fnd_menu_entries_vl
WHERE menu_id = fme.menu_id
AND sub_menu_id = fme.sub_menu_id
AND fme.function_id IS NULL),
(SELECT prompt
FROM apps.fnd_menu_entries_vl
WHERE menu_id = fme.menu_id
AND function_id = fme.function_id
AND fme.sub_menu_id IS NULL)
)
)
+ (LEVEL * 5),
'-'
)
tree_structure
FROM apps.fnd_menu_entries fme
START WITH fme.menu_id =
(SELECT menu_id
FROM apps.fnd_responsibility fr, apps.fnd_responsibility_tl frt
WHERE fr.responsibility_id = frt.responsibility_id
AND frt.responsibility_name = :responsibility_name) -- 'Application Developer'
CONNECT BY PRIOR fme.sub_menu_id = fme.menu_id
No comments:
Post a Comment