Showing posts with label Query to Join Delivery Details and MTL Material Table. Show all posts
Showing posts with label Query to Join Delivery Details and MTL Material Table. Show all posts

Sunday, 17 April 2011

Query to Join Delivery Details and MTL Material Table

Query to Join Delivery Details and MTL Material Table

select wdd.source_header_number, wdd.source_line_id, wdd.delivery_detail_id,

wdd.released_status, oe_interfaced_flag, inv_interfaced_flag,
wdd.creation_date, mtl.transaction_id, l.flow_status_code,
l.open_flag, l.cancelled_flag
from wsh_delivery_details wdd,
mtl_material_transactions mtl,
oe_order_lines_all l
where
l.line_id = wdd.source_line_id
AND wdd.delivery_Detail_id = mtl.picking_line_id
AND wdd.source_code = 'OE'
and wdd.oe_interfaced_flag = 'Y'
and wdd.released_status = 'Y'

Also below is query to Join Order line with MTL_MATERIAL_TRANSACTIONS

select mtl.transaction_id, l.flow_status_code,

l.open_flag, l.cancelled_flag , l.shipped_quantity
from
mtl_material_transactions mtl,
oe_order_lines_all l
where
mtl.trx_source_line_id = l.line_id