Search Results ap_documents_payable
Overview
AP_DOCUMENTS_PAYABLE is an APPS-owned, valid database view in the Oracle E-Business Suite Payables (AP) module. It exposes a unified, denormalized projection of payment documents by joining invoice, payment schedule, check, and payment detail information into a single queryable structure. Rather than forcing callers to reconstruct payment activity from AP_INVOICES_ALL, AP_CHECKS_ALL, AP_INVOICE_PAYMENTS_ALL, and their satellites, the view presents one row per invoice-payment combination already enriched with supplier, bank, currency, discount, and withholding attributes.
Its principal role is as a reporting and integration façade. External systems, custom reports, and Oracle's own payment-related processing use this view to obtain a consistent, business-oriented picture of what has been paid, by which payment method, on which bank account, and under what terms. Because the definition embeds logic from PL/SQL packages and complex NVL/DECODE expressions, it also centralizes otherwise duplicated business rules in one maintainable object.
Underlying Base Objects
The ETRM 12.2.2 metadata documents the following referenced base objects: AP_CHECKS_ALL, AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, AP_INVOICE_PAYMENTS_ALL, AP_INV_SELECTION_CRITERIA_ALL, AP_PAYMENT_SCHEDULES_ALL, AP_SELECTED_INVOICES_ALL, AP_SUPPLIERS, AP_SUPPLIER_SITES_ALL, CE_BANK_ACCT_USES_ALL, and HZ_PARTY_SITES. It additionally invokes two PL/SQL packages: AP_INVOICES_PKG and AP_PAYMENT_UTIL_PKG. The join spine runs from invoices (AP_INVOICES_ALL) through payment schedules (AP_PAYMENT_SCHEDULES_ALL) and invoice-payment links (AP_INVOICE_PAYMENTS_ALL) to checks (AP_CHECKS_ALL). Supplier, party site, and bank account details are attached through the corresponding master data objects. Package calls supply derived values: AP_INVOICES_PKG.GET_PO_NUMBER resolves the purchase order number, and AP_PAYMENT_UTIL_PKG.GET_INTEREST_RATE returns the applicable interest rate for the check date.
Key Columns
- DOCUMENT_TYPE / PAY_PROC_TRXN_TYPE_CODE: Derived via NVL of the payment processing transaction type, defaulting from INVOICE_TYPE_LOOKUP_CODE (EXPENSE REPORT maps to EMPLOYEE_EXP; otherwise PAYABLES_DOC).
- CHECK_ID, INVOICE_ID, INVOICE_PAYMENT_ID: Core identifiers linking the document back to its check, invoice, and payment records.
- CHECK_DATE, INVOICE_DATE, DUE_DATE, DISCOUNT_DATE: Dates governing payment timing; DISCOUNT_DATE applies multi-tier discount logic from AP_PAYMENT_SCHEDULES_ALL.
- INVOICE_AMOUNT, AMOUNT, AMOUNT_WITHHELD, DISCOUNT_TAKEN: Financial measures, including a scalar subquery that negates withheld amounts where LINE_TYPE_LOOKUP_CODE = 'AWT'.
- PAYMENT_METHOD_CODE, PAYMENT_PROFILE_ID, BANK_ACCOUNT_ID, EXTERNAL_BANK_ACCOUNT_ID, BANK_CHARGE_BEARER: Payment routing and settlement attributes.
- PARTY_ID, PARTY_SITE_ID, VENDOR_SITE_ID, LEGAL_ENTITY_ID, ORG_ID: Supplier and organizational context; VENDOR_SITE_ID is nulled when negative.
- INTEREST_RATE, PO_NUMBER, REMITTANCE_MESSAGE1-3, EXCLUSIVE_PAYMENT_FLAG, SETTLEMENT_PRIORITY: Derived or descriptive attributes supporting reconciliation and remittance processing.
Common Use Cases and Queries
Typical scenarios include payment reconciliation reporting, bank account settlement analysis, withholding tax review, and feeding downstream financial systems. A representative query reconciling payments for a given period appears below.
- Filter by CHECK_DATE to report payments issued within a period, grouped by PAYMENT_METHOD_CODE.
- Join to CHECK_ID to aggregate at the check level while retaining invoice detail.
- Use AMOUNT_WITHHELD to audit AWT distributions by party.
- Filter ORG_ID and LEGAL_ENTITY_ID for multi-org security conformance.
Sample:
SELECT CHECK_ID, INVOICE_ID, PARTY_ID, PAYMENT_METHOD_CODE,
INVOICE_AMOUNT, AMOUNT, DISCOUNT_TAKEN, AMOUNT_WITHHELD,
CHECK_DATE, DUE_DATE, DISCOUNT_DATE, PO_NUMBER
FROM APPS.AP_DOCUMENTS_PAYABLE
WHERE CHECK_DATE BETWEEN :p_from AND :p_to
AND ORG_ID = :p_org_id
ORDER BY CHECK_DATE, CHECK_ID;
-
View: AP_DOCUMENTS_PAYABLE
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:SQLAP.AP_DOCUMENTS_PAYABLE, object_name:AP_DOCUMENTS_PAYABLE, status:VALID, product: AP - Payables , implementation_dba_data: APPS.AP_DOCUMENTS_PAYABLE ,
-
View: AP_DOCUMENTS_PAYABLE
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:SQLAP.AP_DOCUMENTS_PAYABLE, object_name:AP_DOCUMENTS_PAYABLE, status:VALID, product: AP - Payables , implementation_dba_data: APPS.AP_DOCUMENTS_PAYABLE ,