Vendor wise PO and Invoice
select pv.VENDOR_NAME,
poh.SEGMENT1 po_num,
aia.INVOICE_NUM,
aia.INVOICE_AMOUNT
from po_vendors pv,
po_headers_all poh,
po_lines_all pol,
po_distributions_all pod,
ap_invoices_all aia,
ap_invoice_distributions_all aid
where pv.VENDOR_ID=poh.vendor_id
and poh.PO_HEADER_ID=pol.PO_HEADER_ID
and pol.PO_LINE_ID=pod.PO_LINE_ID
and poh.VENDOR_ID=aia.VENDOR_ID
and aia.INVOICE_ID=aid.INVOICE_ID
and pod.PO_DISTRIBUTION_ID=aid.PO_DISTRIBUTION_ID
and poh.ORG_ID='204'
No comments:
Post a Comment