jueves, 17 de septiembre de 2015

Query para obtener la lista del navegador por responsabilidad

El siguiente query nos brinda información de todo el contenido de formularios y menús que podemos encontrar por responsabilidad. Cada responsabilidad contiene asociado un solo menú y dentro se ubican submenus y funciones. 

select

 prompt

  FROM (SELECT menu_id,
               sub_menu_id,
               function_id,
               (select function_name
                  from fnd_form_functions_vl
                 where function_id = fme.function_id) func,
               LPAD(' ', (LEVEL - 1) * 2) || prompt prompt,
               entry_sequence
          FROM fnd_menu_entries_vl fme
         WHERE prompt IS NOT NULL
        CONNECT BY PRIOR sub_menu_id = menu_id
         START WITH menu_id =
                    (select menu_Id
                       from apps.FND_RESPONSIBILITY_VL
                      where responsibility_name = '&Responsibility')
                AND menu_id =
                    (select menu_Id
                       from apps.FND_RESPONSIBILITY_VL
                      where responsibility_name = '&Responsibility')
                AND prompt IS NOT NULL
                AND grant_flag = 'Y'
         ORDER BY entry_sequence) a
CONNECT BY PRIOR sub_menu_id = menu_id
 START WITH menu_id =
            (select menu_Id
               from apps.FND_RESPONSIBILITY_VL
              where responsibility_name = '&Responsibility')
        AND menu_id =
            (select menu_Id
               from apps.FND_RESPONSIBILITY_VL
              where responsibility_name = '&Responsibility')

        AND prompt IS NOT NULL;

No hay comentarios:

Publicar un comentario