18 August, 2025

Query to get ORG_ID based on responsibility Name

 SELECT   frv.responsibility_name,
         fpov.profile_option_value org_id,
         hou.name
    FROM apps.fnd_profile_options_vl fpo,
         apps.fnd_responsibility_vl frv,
         apps.fnd_profile_option_values fpov,
         apps.hr_organization_units hou
   WHERE upper(frv.RESPONSIBILITY_NAME) like 'XX_RESP_NAME%'
     AND fpov.profile_option_value = TO_CHAR (hou.organization_id)
     AND fpo.profile_option_id = fpov.profile_option_id
     AND fpo.user_profile_option_name = 'MO: Operating Unit'
     AND frv.responsibility_id = fpov.level_value
ORDER BY frv.responsibility_name;

No comments:

Post a Comment