Search This Blog

Thursday, 7 June 2012

BackOrderd Report

BackOrderd Report

SELECT  OOH.ORDER_NUMBER,
        OOL.LINE_ID,
        OOL.LINE_NUMBER,
        OOL.SHIPMENT_NUMBER,
        OOL.ORDERED_ITEM,
        OOL.ORDERED_QUANTITY,
        HP.PARTY_NAME,
        WDV.RELEASED_STATUS_NAME,
        WDV.SOURCE_NAME
  FROM  OE_ORDER_HEADERS_ALL OOH,
        OE_ORDER_LINES_ALL OOL,
        HZ_CUST_ACCOUNTS HCA,
        HZ_PARTIES HP,
        WSH_DELIVERY_DETAILS WDD,
        WSH_DELIVERABLES_V WDV
 WHERE  OOH.HEADER_ID=OOL.HEADER_ID 
   AND  OOH.SOLD_TO_ORG_ID=HCA.CUST_ACCOUNT_ID
   AND  HCA.PARTY_ID=HP.PARTY_ID
   AND  OOL.LINE_ID=WDD.SOURCE_LINE_ID
   AND  WDD.DELIVERY_DETAIL_ID=WDV.DELIVERY_DETAIL_ID
   AND  WDV.RELEASED_STATUS_NAME LIKE 'Backordered'
   AND  OOH.ORG_ID=NVL(:p_org_id,OOH.ORG_ID)
   AND  HP.PARTY_NAME=NVL(:P_PARTY_NAME,HP.PARTY_NAME)

No comments:

Post a Comment