LOT NUMBER / PO / RECEIPT NO Relation.

LOT NUMBER / PO / RECEIPT NO Relation.

image

--qa --> po --> receipt no --> rcv --> mmt --> inv lot

select *
from 
--inv item
mtl_material_transactions  mmt
, mtl_transaction_lot_numbers mtln
--rcv trans
, rcv_transactions rt
, rcv_shipment_headers rsh
, rcv_shipment_lines   rsl
--qa plan
, qa_results qr
where 1=1
and mmt.transaction_id = mtln.transaction_id
and mmt.organization_id = mtln.organization_id
--and mmt.transaction_action_id not in (24, 30)
and mmt.organization_id = 122
--and mmt.transaction_id =12793270
---------------------
and mmt.rcv_transaction_id = rt.transaction_id
and rsl.shipment_line_id = rt.shipment_line_id
and rsh.shipment_header_id = rt.shipment_header_id
and rsh.shipment_header_id=rsl.shipment_header_id
----------------
and rt.qa_collection_id = qr.collection_id
and qr.plan_id = 133  -- HKC EPOXY IQC PARENT PLAN
--AND (qr.status IS NULL OR qr.status = 2)
;
posted @ 2013-06-14 15:23  全威儒  阅读(1172)  评论(0编辑  收藏  举报