---- Responsibility wise User Name Search Script
SELECT fu.user_name "User Name",
frt.responsibility_name "Responsibility Name",
fat.APPLICATION_NAME "Application 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
,fnd_user fu
,fnd_responsibility_tl frt
,fnd_responsibility fr
,fnd_application_tl fat
,fnd_application fa
WHERE furg.user_id = fu.user_id
AND furg.responsibility_id = frt.responsibility_id
AND upper(frt.responsibility_name) = UPPER(:P_Respo_Name) --'Yard Manager')
AND fr.responsibility_id = frt.responsibility_id
AND fr.application_id = fat.application_id
AND frt.language = USERENV('LANG')
AND fa.application_id = fat.application_id
AND (furg.end_date IS NULL OR furg.end_date >= TRUNC(SYSDATE))
ORDER BY fu.user_name;