Thursday, May 6, 2010

Query providing Order,Delivery (R12)

Below query joins the Order and Delivery tables.

This query is tested in R12.1.1.

SELECT wnd.delivery_id
      ,wnd.name
      ,wnd.customer_id
      ,wnd.volume
      ,wnd.status_code
      ,wnd.ship_method_code
      ,wnd.initial_pickup_date
      ,wdd.cust_po_number
      ,wdd.requested_quantity_uom
      ,wdd.shipped_quantity
      ,wdd.requested_quantity
      ,wdd.subinventory
      ,wdd.shipment_priority_code
      ,wdd.released_status
      ,wdd.serial_number
      ,wdd.lot_number
      ,h.order_number
      ,h.cust_po_number
      ,h.ship_from_org_id
      ,l.line_number
      ,l.ordered_item
      ,l.ordered_quantity
      ,l.shipped_quantity
FROM   wsh_new_deliveries wnd
      ,wsh_delivery_assignments wda
      ,wsh_delivery_details wdd
      ,oe_order_lines_all l
      ,oe_order_headers_all h
WHERE wnd.delivery_id        = wda.delivery_id
AND   wdd.delivery_detail_id = wda.delivery_detail_id
AND   wdd.source_line_id     = l.line_id
AND   wdd.source_header_id   = l.header_id
AND   l.header_id            = h.header_id
AND   wnd.delivery_id        ='&delivery_id‘;


Quote for the post:
All blame is a waste of time. No matter
how much fault you find with another, 
and regardless of how much you 
blame him, it will not change you"
 
- Wayne Dyer

0 Responses to “Query providing Order,Delivery (R12)”

Post a Comment

Disclaimer

The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.