1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Inventory Organization Query 1.1

Inventory Organization Query

  1. Zforever
    SELECT haou.organization_id,
    hoic2.org_information1 AS primary_ledger,
    gl.name AS primary_ledger_name-- , hoic2.org_information2 as legal_entity_id
    hoic2.org_information3 AS ou_id,
    hou.name AS ou_name
    FROM hr_all_organization_units haou,
    hr_organization_information hoic1,
    hr_organization_information hoic2,
    hr_operating_units hou,
    gl_ledgers gl
    WHERE 1 = 1
    AND haou.organization_id = hoic1.organization_id
    AND hoic1.org_information_context = 'CLASS'
    AND hoic1.org_information1 = 'INV'
    AND haou.organization_id = hoic2.organization_id(+)
    AND hoic2.org_information_context(+) = 'Accounting Information'
    AND hoic2.org_information3 = hou.organization_id(+)
    AND hoic2.org_information1 = gl.ledger_id(+)