Select
MSI.SEGMENT1 encoding
, Msi.description describes
, Number of mr.old_order_quantity
, Mipo.po_number please purchase order
, Mipo.purch_line_num Order Bar
, pv.vendor_name Suppliers
, Ppf.last_name Buyer
From
Mrp. Mrp_item_exceptions Mie
, Apps.mfg_lookups ML
Mrp. Mrp_item_purchase_orders Mipo
, Po.po_vendors PV
, Hr.per_all_people_f PPF
Mrp. Mrp_recommendations Mr
, INV. Mtl_system_items_b MSI
where
Mie.organization_id=x
and msi.organization_id=mie.organization_id
and msi.inventory_item_id=mie.inventory_item_id
and ml.lookup_type= ' Mrp_exception_code_type '
and Mie.exception_type=ml.lookup_code
and pv.vendor_id (+) =mr.vendor_id
and mie.exception_type=8
and mr.organization_id=mie.organization_id
and mr.inventory_item_id=mie.inventory_item_id
and mr.disposition_status_type=2
and mr.order_type=2
and mr.disposition_id=mipo.transaction_id
and msi.buyer_id=ppf.person_id