Use the below code :
create or replace PROCEDURE PRINT_FUNCTIONS(p_in_menu_id IN NUMBER)
IS
BEGIN
FOR rec IN (
SELECT
menu.entry_sequence
,menu.menu_id
,menu.sub_menu_id
,menu.function_id
,prompt
,( SELECT user_menu_name FROM fnd_menus_vl fmv
WHERE fmv.menu_id = menu.menu_id
) menu_name
,( SELECT user_menu_name FROM fnd_menus_vl fmv
WHERE fmv.menu_id = menu.sub_menu_id
) sub_menu_name
,( SELECT user_function_name FROM fnd_form_functions_tl func
WHERE func.function_id = menu.function_id
) func_name
FROM fnd_menu_entries_vl menu WHERE prompt IS NOT NULL
AND menu_id = p_in_menu_id order by menu.entry_sequence
)
LOOP
IF rec.sub_menu_id IS NOT NULL AND rec.function_id IS NULL
THEN
PRINT_FUNCTIONS(rec.sub_menu_id); --recursive call
ELSIF rec.function_id IS NOT NULL
THEN
dbms_output.put_line(rec.func_name);
END IF;
END LOOP;
END PRINT_FUNCTIONS;
Comments
Post a Comment