Wednesday, March 27, 2013

Form Function attached to Responsibilities


List of Responsibilities associated with Form Functions

SELECT DISTINCT responsibility_id, responsibility_name
    FROM apps.fnd_responsibility_vl a
   WHERE     a.end_date IS NULL
         AND a.menu_id IN
                (    SELECT menu_id
                       FROM apps.fnd_menu_entries_vl
                 START WITH menu_id IN
                               (SELECT menu_id
                                  FROM apps.fnd_menu_entries_vl
                                 WHERE function_id IN
                                          (SELECT function_id
                                             FROM applsys.fnd_form_functions a
                                            WHERE function_name =
                                                     :pc_function_name))
                 CONNECT BY PRIOR menu_id = sub_menu_id)
         AND a.responsibility_id NOT IN
                (SELECT responsibility_id
                   FROM apps.fnd_responsibility_vl
                  WHERE responsibility_id IN
                           (SELECT responsibility_id
                              FROM applsys.fnd_resp_functions resp
                             WHERE action_id IN
                                      (SELECT function_id
                                         FROM applsys.fnd_form_functions a
                                        WHERE function_name = :pc_function_name)))
         AND a.responsibility_id NOT IN
                (SELECT responsibility_id
                   FROM apps.fnd_responsibility_vl
                  WHERE responsibility_id IN
                           (SELECT responsibility_id
                              FROM applsys.fnd_resp_functions resp
                             WHERE action_id IN
                                      (    SELECT menu_id
                                             FROM apps.fnd_menu_entries_vl
                                       START WITH menu_id IN
                                                     (SELECT menu_id
                                                        FROM apps.fnd_menu_entries_vl
                                                       WHERE function_id IN
                                                                (SELECT function_id
                                                                   FROM applsys.fnd_form_functions a
                                                                  WHERE function_name =
                                                                           :pc_function_name))
                                       CONNECT BY PRIOR menu_id = sub_menu_id)))

ORDER BY responsibility_id

5 comments:

  1. Hi, The query is not identifying pc_function_name . pls help

    ReplyDelete
  2. I have modified query with bind parameter for function name, please try now

    ReplyDelete
  3. thank you very much!!!! it helps me a lot.

    ReplyDelete
  4. Hi, it is doesn't exclude the function that was excluded in Responsibility form...

    ReplyDelete

Note: Only a member of this blog may post a comment.