Wednesday, 27 June 2018

QUERY TO FIND RESPONSIBILITIES ATTACHED TO A USER IN ORACLE R12

SELECT * FROM FND_USER WHERE user_name LIKE 'TEST';

SELECT *
  FROM FND_USER_RESP_GROUPS
 WHERE user_id=1180; --user_id is the link between the FND_USER and the FIND_USER_RESP_GROUPS

SELECT *
  FROM FND_RESPONSIBILITY_VL
 WHERE responsibility_id=50621; --responsibility_id is the link between the FND_RESPONSIBILITY_VL and FND_USER_RESP_GROUPS

-- The query which displays the user name and his responsibility_name will be

SELECT fu.user_name, ppx.employee_number, ppx.full_name,
       frv.responsibility_name,
        fat.APPLICATION_NAME
  FROM fnd_user fu,
       fnd_user_resp_groups furg,
       fnd_responsibility_vl frv,
       per_people_x ppx,
       fnd_application_tl fat
 WHERE fu.user_id = furg.user_id
   AND furg.responsibility_id = frv.responsibility_id
   AND fu.employee_id = ppx.person_id(+)
   and furg.RESPONSIBILITY_APPLICATION_ID=fat.APPLICATION_ID
   and fu.user_name like 'TEST'

No comments:

Post a Comment