Friday, 16 August 2013

Query to Find the Direct Responsibilities assign to User

SELECT fu.user_name "User", responsibility_name "Responsibility",
       application_name "Application", furgd.description "Description",
       security_group_key "SECURITY GROUP",
       TO_CHAR (furgd.start_date, 'DD-Mon-YYYY') "Start Date",
       TO_CHAR (furgd.end_date, 'DD-Mon-YYYY') "End Date",
       fuc.user_name "Added By", ful.user_name "Updated By"
  FROM fnd_user fu,
       fnd_responsibility_tl fr,
       fnd_user_resp_groups_direct furgd,
       fnd_application_tl fa,
       fnd_security_groups fsg,
       fnd_user fuc,
       fnd_user ful
 WHERE fr.responsibility_id = furgd.responsibility_id
   AND fu.user_id = furgd.user_id
   AND fa.application_id = furgd.responsibility_application_id
   AND fsg.security_group_id = furgd.security_group_id
   AND furgd.created_by = fuc.user_id
   AND furgd.created_by = ful.user_id
   AND fu.user_name = UPPER (:user_name);

No comments:

Post a Comment