Sunday, 25 November 2012

Query to find Picked but not Dropped line(In material tranasation temp WMS)


SELECT   (SELECT   organization_code
            FROM   org_organization_definitions
           WHERE   organization_id = mmt.organization_id)
            org_name,
         msi.segment1 part_num,
         mmt.transaction_quantity,
         transaction_date,
         license_plate_number,
         TRANSFER_SUBINVENTORY,
         (SELECT   concatenated_segments
            FROM   mtl_item_locations_kfv
           WHERE   inventory_location_id = mmt.TRANSFER_TO_LOCATION)
            loc_name,lpn_context
  FROM   mtl_material_transactions_temp mmt,
         mtl_system_items_b msi,
         wms_license_plate_numbers wlp
 WHERE       mmt.inventory_item_id = msi.inventory_item_id
         AND mmt.organization_id = msi.organization_id
         AND mmt.transfer_lpn_id = wlp.lpn_id
         AND mmt.organization_id = :P_ORG_ID

Item Against Sub inventory and locatory


/* Get Item Against Primary Subinv and locator */
  SELECT   SEGMENT1 PART_NUM,
           (SELECT   SECONDARY_INVENTORY
              FROM   MTL_ITEM_SUB_INVENTORIES_ALL_V
             WHERE       INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID
                     AND ORGANIZATION_ID = MSI.ORGANIZATION_ID
                     AND ROWNUM = 1)
              PRIMARY_SUB_INV,
           (SELECT   CONCATENATED_SEGMENTS
              FROM   MTL_ITEM_LOCATIONS_KFV
             WHERE   INVENTORY_LOCATION_ID IN
                           (SELECT   MIN (SECONDARY_LOCATOR)
                              FROM   MTL_SECONDARY_LOCATORS_ALL_V
                             WHERE   INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID
                                     AND ORGANIZATION_ID = MSI.ORGANIZATION_ID))
              LOCATOR
    FROM   MTL_SYSTEM_ITEMS_B MSI
   WHERE   ORGANIZATION_ID = :P_ORG_ID
ORDER BY   1

Friday, 13 April 2012

To know the Meaning of WMS LPN Context Value

Oracle Warehouse Management - LPN Context Codes
LPN Context Value Description
1 Resides in Inventory
2 Resides in WIP
3 Resides in Receiving
4 Resides in Stores
5 Pre-generated
6 Resides in Intransit
7 Resides in Vendor Site
8 Packing context, used as a temporary context value
9 Loaded for shipment
10 Prepack of WIP
11 Picked

To Know the ONT Released Status Meaning

Released Status MEANING DESCRIPTION
B Backordered Line failed to be allocated in Inventory
C Shipped Line has been shipped
D Cancelled Line is Cancelled
R Ready to Release Line is ready to be released
S Released to Warehouse Line has been released to Inventory for processing
X Not Applicable Line is not applicable for Pick Release
Y Staged/Pick Confirmed Line has been picked and staged by Inventory

How to kill the session

/* Formatted on 10-Apr-12 12:42:46 PM (QP5 v5.115.810.9015) */
SELECT   c.object_name,
         b.sid,
         b.serial#,
         b.machine
  FROM   v$locked_object a, v$session b, dba_objects c
 WHERE   b.sid = a.session_id AND a.object_id = c.object_id
and object_name  like 'XXHMI%'--_INV_MAS_PKG_T_EXC%'-- ='MTL_SYSTEM_ITEMS_INTERFACE';

OBJECT_NAME,               SID,SERIAL#,MACHINE

MTL_SYSTEM_ITEMS_INTERFACE,2948,7,our12-test.bilt.com
--Solution:-

alter system kill session '2255,371' Immediate;