Pages

Friday, January 31, 2014

To get Locator Status

SELECT distinct(ood.organization_code),
--       moqd.organization_id org_id,
       moqd.subinventory_code sub_inventory_name,
       CONCATENATED_SEGMENTS locator,
       (CASE mil.status_id
           WHEN 1 THEN 'ACTIVE'
           WHEN 22 THEN 'IN_ACTIVE'
           WHEN 23 THEN 'DISABLED'
           WHEN 24 THEN 'NO TRANSACTIONS'
           WHEN 20 THEN 'NON REVERSABLE'
           ELSE NULL
        END)
          status
FROM mtl_item_locations_kfv mil,
     mtl_onhand_quantities_detail moqd,
     org_organization_definitions ood
WHERE     moqd.locator_id = mil.inventory_location_id
--      AND moqd.organization_id NOT IN ()
      AND moqd.organization_id = ood.organization_id
ORDER BY 2

No comments:

Post a Comment