select
h.request_number,
l.line_number,
msib.segment1
item_code,
t.transaction_temp_id,
t.transaction_quantity,
l.quantity
from mtl_material_transactions_temp
t,
mtl_txn_request_headers
h,
mtl_txn_request_lines
l,
mtl_system_items_b
msib
where t.move_order_header_id = h.header_id
and
t.inventory_item_id = msib.inventory_item_id
and
t.organization_id = msib.organization_id
and
t.move_order_line_id =l.line_id
and t.organization_id =
l.organization_id
and t.move_order_line_id is not
null
and t.transaction_type_id=35
and
t.transaction_quantity<0
order by request_number,
line_number;