Below script will list the users who has System Administrator responsibility.
SELECT fuser.user_name "User ID",
fuser.description "User Name",
frt.responsibility_name "Responsibility Name",
furgd.start_date "Start Date",
furgd.end_date "End Date",
fresp.responsibility_key "Responsibility Key",
fapp.application_short_name "Application Short Name"
FROM fnd_user_resp_groups_direct furgd,
fnd_user fuser,
fnd_responsibility fresp,
fnd_responsibility_tl frt,
fnd_application fapp,
fnd_application_tl fat
WHERE furgd.user_id = fuser.user_id
AND furgd.responsibility_id = frt.responsibility_id
AND fresp.responsibility_id = frt.responsibility_id
AND fapp.application_id = fat.application_id
AND fresp.application_id = fat.application_id
AND frt.language = USERENV('LANG')
AND UPPER(frt.responsibility_name) = 'SYSTEM ADMINISTRATOR'
AND (furgd.end_date IS NULL OR furgd.end_date >= TRUNC(SYSDATE))
fuser.description "User Name",
frt.responsibility_name "Responsibility Name",
furgd.start_date "Start Date",
furgd.end_date "End Date",
fresp.responsibility_key "Responsibility Key",
fapp.application_short_name "Application Short Name"
FROM fnd_user_resp_groups_direct furgd,
fnd_user fuser,
fnd_responsibility fresp,
fnd_responsibility_tl frt,
fnd_application fapp,
fnd_application_tl fat
WHERE furgd.user_id = fuser.user_id
AND furgd.responsibility_id = frt.responsibility_id
AND fresp.responsibility_id = frt.responsibility_id
AND fapp.application_id = fat.application_id
AND fresp.application_id = fat.application_id
AND frt.language = USERENV('LANG')
AND UPPER(frt.responsibility_name) = 'SYSTEM ADMINISTRATOR'
AND (furgd.end_date IS NULL OR furgd.end_date >= TRUNC(SYSDATE))
AND (fuser.end_date IS NULL OR fuser.end_date >= TRUNC(SYSDATE)) -- Active users
ORDER BY frt.responsibility_name;
ORDER BY frt.responsibility_name;
Similarly, same query can find all responsibilities for a user:
SELECT fuser.user_name "User ID",
fuser.description "User Name",frt.responsibility_name "Responsibility Name",
furgd.start_date "Start Date",
furgd.end_date "End Date",
fresp.responsibility_key "Responsibility Key",
fapp.application_short_name "Application Short Name"
FROM fnd_user_resp_groups_direct furgd,
fnd_user fuser,
fnd_responsibility fresp,
fnd_responsibility_tl frt,
fnd_application fapp,
fnd_application_tl fat
WHERE furgd.user_id = fuser.user_id
AND furgd.responsibility_id = frt.responsibility_id
AND fresp.responsibility_id = frt.responsibility_id
AND fapp.application_id = fat.application_id
AND fresp.application_id = fat.application_id
AND frt.language = USERENV('LANG')
AND UPPER(fuser.user_name) = UPPER('&Enter_User_Name')
-- AND UPPER(frt.responsibility_name) = 'SYSTEM ADMINISTRATOR'
AND (furgd.end_date IS NULL OR furgd.end_date >= TRUNC(SYSDATE))ORDER BY frt.responsibility_name;