Saturday, September 22, 2018

Organization Unit - Inventory Org - Sub Inventory - Locator Query

Organization Unit - Inventory Org - Sub Inventory - Locator Query

SELECT
    hou.name                          operating_unit,
    ood.organization_name             inventory_org_name,
    subinv.secondary_inventory_name   sub_inventory_name,
    subinv.description                sub_inventory_desc,
    loc.description                   locator_name
FROM
    hr_operating_units hou,
    org_organization_definitions ood,
    mtl_secondary_inventories subinv,
    mtl_item_locations loc
WHERE
    ood.organization_id = subinv.organization_id
    AND ood.operating_unit = hou.organization_id
    AND subinv.secondary_inventory_name = loc.subinventory_code
ORDER BY
    hou.name,
    ood.organization_name,
    subinv.description,
    loc.description;

No comments: