Query to get Organization Hierarchy in Oracle apps

By admin

Query to get Organization Hierarchy in Oracle apps
Oracle EBS query to get organization structure
Oracle R12 sql to find the operating unit and warehouse inventory org structure

SQL Querysql
1SELECT LPAD (' ', 10 * (LEVEL - 1)) || org.name hierarchy,
2                  org.organization_id
3             FROM hr_all_organization_units org, per_org_structure_elements pose
4            WHERE 1 = 1 AND org.organization_id = pose.organization_id_child
5       --and org.name like 'org name'
6       START WITH pose.organization_id_parent = 123 -- Orgnization of parent id -- provide the id from which level the downward hierarchy should be displayed
7       CONNECT BY PRIOR pose.organization_id_child = pose.organization_id_parent
8ORDER SIBLINGS BY org.location_id, pose.organization_id_child

Related posts: