Saturday, May 17, 2014

Query to find responsibilities attached to a user in Oracle R12

SELECT * FROM FND_USER WHERE user_name LIKE 'DAVIDEVANS';

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_id,
       fu.user_name,
       furg.RESPONSIBILITY_APPLICATION_ID,
       frv.RESPONSIBILITY_NAME
  from FND_USER fu, FND_USER_RESP_GROUPS furg, FND_RESPONSIBILITY_VL frv
 where fu.user_id = furg.user_id
   and furg.responsibility_id = frv.responsibility_id
   and fu.user_name like 'DAVIDEVANS'

0 comments:

Post a Comment