Tuesday, 18 June 2019

Find The Oracle Module Responsibility User Wise in Oracle EBS R12

For Single User
--------------------
SELECT fu.user_name                         "User Name",
frt.responsibility_name                          "Responsibility Name",
furg.start_date                                        "Start Date",
furg.end_date                                         "End Date",   
fr.responsibility_key                              "Responsibility Key",
fa.application_short_name                    "Application Short Name"
FROM fnd_user_resp_groups_direct     furg,
applsys.fnd_user                                     fu,
applsys.fnd_responsibility_tl                  frt,
applsys.fnd_responsibility                      fr,
applsys.fnd_application_tl                      fat,
applsys.fnd_application                          fa
WHERE furg.user_id              =  fu.user_id
AND furg.responsibility_id     =  frt.responsibility_id
AND fr.responsibility_id         =  frt.responsibility_id
AND fa.application_id            =  fat.application_id
AND fr.application_id            =  fat.application_id
AND frt.language                   =  USERENV('LANG')
AND UPPER(fu.user_name)      =  UPPER('FURQAN')  -- <change it>
-- AND (furg.end_date IS NULL OR furg.end_date >= TRUNC(SYSDATE))
ORDER BY frt.responsibility_name;

For Multiple Users
-------------------------

SELECT FURGA.USER_ID
, FU.USER_NAME
, FURGA.RESPONSIBILITY_ID
, FRTL.RESPONSIBILITY_NAME
, FURGA.RESPONSIBILITY_APPLICATION_ID
, FA.APPLICATION_SHORT_NAME
, FURGA.SECURITY_GROUP_ID
, FSG.SECURITY_GROUP_KEY
, FURGA.START_DATE
, FURGA.END_DATE
, FURGA.CREATED_BY
, FUCB.USER_NAME
, FURGA.CREATION_DATE
, FURGA.LAST_UPDATED_BY
, FULUB.USER_NAME
, FURGA.LAST_UPDATE_DATE
, FURGA.LAST_UPDATE_LOGIN
, FULUL.USER_NAME
FROM
FND_USER_RESP_GROUPS_ALL FURGA,
FND_USER FU,
FND_USER FUCB,
FND_USER FULUB,
FND_USER FULUL,
FND_APPLICATION FA,
FND_RESPONSIBILITY_TL FRTL,
FND_SECURITY_GROUPS FSG
WHERE
FURGA.USER_ID = FU.USER_ID (+)
AND FURGA.CREATED_BY = FUCB.USER_ID (+)
AND FURGA.LAST_UPDATED_BY = FULUB.USER_ID (+)
AND FURGA.LAST_UPDATE_LOGIN = FULUL.USER_ID (+)
AND FURGA.RESPONSIBILITY_APPLICATION_ID = FA.APPLICATION_ID (+)
AND FURGA.RESPONSIBILITY_ID = FRTL.RESPONSIBILITY_ID (+)
AND FRTL.LANGUAGE = 'US'
AND FURGA.SECURITY_GROUP_ID = FSG.SECURITY_GROUP_ID (+)
--AND FU.User_Name='FURQAN'
--AND FRTL.RESPONSIBILITY_NAME ='System Administrator'
ORDER BY START_DATE


Source: Internet/R&D

No comments:

Post a Comment