Friday, 24 January 2014

Order Management Queries

SELECT RCTA.*
  FROM OE_ORDER_HEADERS_ALL OOHA,
       RA_CUSTOMER_TRX_ALL RCTA
 WHERE TO_CHAR(OOHA.ORDER_NUMBER) = RCTA.INTERFACE_HEADER_ATTRIBUTE1
   AND OOHA.ORDER_NUMBER = 66431
  
================================================

SELECT WDA.DELIVERY_ID
  FROM OE_ORDER_HEADERS_ALL OOHA,
       WSH_DELIVERY_DETAILS WDD,
       WSH_DELIVERY_ASSIGNMENTS WDA
 WHERE OOHA.HEADER_ID = WDD.SOURCE_HEADER_ID
   AND WDD.DELIVERY_DETAIL_ID = WDA.DELIVERY_DETAIL_ID
   AND OOHA.ORDER_NUMBER = '66431'  
  
==================================================

SELECT OTTT.NAME ORDER_TYPE
  FROM OE_ORDER_HEADERS_ALL OOHA,
       OE_TRANSACTION_TYPES_TL OTTT
 WHERE OOHA.ORDER_TYPE_ID = OTTT.TRANSACTION_TYPE_ID
   AND OOHA.ORDER_NUMBER = '66431'
   AND OTTT.LANGUAGE = 'US'
  
================================================

SELECT MSIB.SEGMENT1 ITEM,
       OOLA.ORDERED_QUANTITY
  FROM OE_ORDER_HEADERS_ALL OOHA,
       OE_ORDER_LINES_ALL OOLA,
       MTL_SYSTEM_ITEMS_B MSIB
 WHERE OOHA.HEADER_ID = OOLA.HEADER_ID
   AND OOLA.INVENTORY_ITEM_ID = MSIB.INVENTORY_ITEM_ID
   AND OOLA.SHIP_FROM_ORG_ID = MSIB.ORGANIZATION_ID
   AND OOHA.ORDER_NUMBER = 66431

No comments:

Post a Comment