Monday, 31 October 2011

R12 Imo_Subinv_Ohq_Qry

Select * from mtl_system_items_b where ORGANIZATION_ID=117
Select * from org_organization_definitions
SELECT   DISTINCT msi.SEGMENT1 New_Item_Code,
                  msi.description,
                  msi.attribute6 Old_Item_Code,
                  msi.PRIMARY_UNIT_OF_MEASURE UOM_Code,
                  kfv.CONCATENATED_SEGMENTS Item_Category
  FROM   mtl_system_items_b msi,
         mtl_categories_kfv kfv,
         mtl_item_categories mic
 WHERE       msi.INVENTORY_ITEM_ID = mic.INVENTORY_ITEM_ID
         AND mic.CATEGORY_ID = kfv.CATEGORY_ID
         AND mic.ORGANIZATION_ID = msi.ORGANIZATION_ID
         AND msi.ORGANIZATION_ID = 117
         --and msi.attribute6 is not null
        

SELECT  distinct ORGANIZATION_NAME,
         SECONDARY_INVENTORY_NAME,
         mts.DESCRIPTION,
         mil.CONCATENATED_SEGMENTS Locator_Code
  FROM   mtl_secondary_inventories mts,
         org_organization_definitions ood,
         MTL_ITEM_LOCATIONS_kfv mil,
         MTL_ONHAND_QUANTITIES_DETAIL moq
 WHERE       mts.ORGANIZATION_ID = ood.ORGANIZATION_ID
         AND moq.ORGANIZATION_ID = ood.ORGANIZATION_ID
         AND moq.LOCATOR_ID = mil.INVENTORY_LOCATION_ID(+)
        

No comments:

Post a Comment