SQL to get Business Unit Name or ID in Oracle Fusion


In Fusion for any given Business Unit Name you would see that there are three entries available. So, to get the actual business unit id you need to filter by correct classification i.e.  houc.classification_code = 'FUN_BUSINESS_UNIT'


SELECT
 hout.organization_id,
       hout.NAME
FROM   hr_all_organization_units_f hou,
       hr_organization_units_f_tl hout,
       hr_org_unit_classifications_x houc
WHERE  hou.organization_id = hout.organization_id
       AND hou.organization_id = houc.organization_id
       AND houc.classification_code = 'FUN_BUSINESS_UNIT'
       AND hout.NAME = 'ABC Business Unit'  ;


SELECT *
FROM   hr_operating_units
WHERE  NAME = 'ABC Business Unit'; 


Comments