AP invoice payable Certificate

Source: Internet
Author: User
Module: AP

Related table: AP. AP_INVOICES_ALL AIA Invoice header

AP. AP_INVOICE_LINES_ALL AIL invoice line

APPS. PO_VENDORS supplier

PO. PO_HEADERS_ALL purchase Header

RCV_SHIPMENT_HEADERS RSH receives the transaction Header

RCV_SHIPMENT_LINES RSL receives transaction rows

Other: connection between the receiving transaction and the invoice, AIL. RCV_SHIPMENT_LINE_ID = RSL. SHIPMENT_LINE_ID (+)
And rsl. SHIPMENT_HEADER_ID = RSH. SHIPMENT_HEADER_ID (+)

SQL:

Select aia. invoice_num,
Aia. invoice_date,
Aia. creation_date,
Aia. vendor_id,
Aia. invoice_currency_code,
Ail. amount,
Ail. base_amount,
Aia. description,
Decode (ail. base_amount,
Null,
1,
Round (ail. base_amount/ail. amount, 4 )),
Ail. inventory_item_id,
Ail. quantity_invoiced,
Ail. unit_price,
Ail. amount,
Ail. base_amount,
Ail. rcv_transaction_id,
Msi. segment1,
Msi. description,
Rsh. receipt_num,
Pha. segment1,
Pv. vendor_name,
Rsl. quantity_policed
From ap. ap_invoices_all aia,
Ap. ap_invoice_lines_all ail,
Po. po_headers_all pha,
Apps. po_vendors pv,
Inv. mtl_system_items_ B msi,
Rcv_shipment_headers rsh, -- receiving Header
Rcv_shipment_lines rsl -- receiving line
Where aia. invoice_id = ail. invoice_id
And ail. po_header_id = pha. po_header_id (+)
And aia. vendor_id = pv. vendor_id
And ail. inventory_item_id = msi. inventory_item_id (+)
And ail.org _ id = msi. organization_id (+)
And ail. rcv_shipment_line_id = rsl. shipment_line_id (+)
And rsl. shipment_header_id = rsh. shipment_header_id (+)
And ail. line_type_lookup_code = 'item'

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.