Tuesday, July 1, 2014

SQL query to find out Drop Ship Sales Order, Line, Requisition and Purchase order

select h.order_number,l.line_number SO_Line_number,  ph.segment1
PO_Number,pl.line_num PO_Line_Number,
ph.authorization_status,ph.closed_date,ph.closed_code,
prh.interface_source_code,
prh.segment1 Requisition_number, prl.line_num Requisition_line_number
from
OE_DROP_SHIP_SOURCES ods,
oe_order_headers_all h,
oe_order_lines_all l,
po_line_locations_all pll,
po_lines_all pl,
po_headers_all ph,
po_requisition_headers_all prh,
po_requisition_lines_all prl
where h.header_id = l.header_id
and h.header_id = ods.header_id
and ods.line_location_id = pll.line_location_id
and ods.po_header_id = ph.po_header_id
and ods.po_line_id = pl.po_line_id
and ph.po_header_id = pl.po_header_id
and prh.requisition_header_id = ods.requisition_header_id
and prl.requisition_line_id = ods.requisition_line_id
and prh.requisition_header_id = prl.requisition_header_id
and h.order_number = &sales_order_number;

No comments:

Post a Comment

Disclaimer

All content provided on this blog is for informational purposes only. The owners of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. All trademarks, trade names, service marks, copyrighted work and logos referenced here - belong to their respective owners.If you want to report any content that is violating copyright law and you want us to remove it, please contact us.

Featured Post

Complete Oracle P2P cycle