Oracle Ebs-sql (PO-7): Check for exceptions-non-approved vendor setup delivery ratios. SQL

Source: Internet
Author: User

SELECT DISTINCT
Msr.sourcing_rule_name Name
, msi.description description
, Msi.item_type type
, Msi.inventory_item_status_code status
, the Msr.planning_active program takes effect
, msro.effective_date Effective Date
, Msro.disable_date Invalid Date
, msro.attribute1 proportional Month
, Decode (msso.source_type,3, ' sourcing source ', 2, ' manufacturing location ', ' transfer to ') source type
, Pv.vendor_name supplier name
, Pv.segment1 Supplier Code
, Pvs.vendor_site_code address abbreviation
, msso.allocation_percent ratio
, Msso.rank priority
From MRP. Mrp_sourcing_rules MSR
, mrp.mrp_sr_receipt_org Msro
, mrp.mrp_sr_source_org Msso
, Inv.mtl_system_items_b MSI
, Po.po_vendors PV
, Po.po_vendor_sites_all PVs
where msi.organization_id = X
and msi.organization_id = msr.organization_id
and msi.segment1 = Msr.sourcing_rule_name
and msr.organization_id = msro.receipt_organization_id
and msr.sourcing_rule_id = msro.sourcing_rule_id
and msro.sr_receipt_id = msso.sr_receipt_id
and pvs.vendor_site_id = msso.vendor_site_id
and pvs.vendor_id = pv.vendor_id
and msso.vendor_id = pv.vendor_id
and msso.source_type=3
and msso.allocation_percent >0--option to exclude ratio 0
and msro.disable_date is null
And NOT EXISTS (the select null from PO. Po_approved_supplier_list AVL
where avl.owning_organization_id=msi.organization_id
and avl.item_id = msi.inventory_item_id
and avl.vendor_site_id = pvs.vendor_site_id)
ORDER BY Msr.sourcing_rule_name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.