Search Results vendor_prepay_amount




Overview

APPS.AP_INVOICE_PREPAYS_V is a seeded Oracle E-Business Suite database view that consolidates prepayment and applied-invoice information for the Payables module. It is defined by a UNION of two SELECT statements. The first branch returns rows flagged as PREPAYMENT_FLAG = 'PREPAYMENT', sourced by joining AP_INVOICE_PREPAYS to AP_INVOICES through the relationship AIPP.PREPAY_ID = AI.INVOICE_ID, and further joined to PO_VENDORS and PO_VENDOR_SITES for supplier descriptive attributes. The second branch carries an inline comment identifying its purpose: the view is intended for use as a base table for Oracle Forms 4.5 programs in the 10g release, and specifically supports the Apply Prepayment form (APXIWPAA), returning invoice rows flagged as PREPAYMENT_FLAG = 'INVOICE'.

Because the view bridges prepayment headers and the invoices against which prepayments are applied, it functions as a reporting and integration shortcut that surfaces both sides of the prepayment relationship without requiring callers to reproduce the multi-table join manually.

Underlying Base Objects

The ETRM 12.2.2 metadata documents the following referenced objects:

  • AP_INVOICES (SYNONYM) — supplies invoice number, dates, payment currency, set of books, vendor, vendor site, description, and the payment-currency invoice amount.
  • AP_INVOICE_PREPAYS (SYNONYM) — the prepayment application table; provides the joined ROWID, ORG_ID, PREPAY_ID, PREPAYMENT_AMOUNT_APPLIED, and audit columns.
  • AP_PAYMENT_SCHEDULES (SYNONYM) — referenced within the view's complete definition for payment schedule amounts, although not exposed as a direct output column in the excerpt.
  • FND_GLOBAL (PACKAGE) — the standard EBS context package, typically used to supply ORG_ID and user/application context.
  • PO_VENDORS (VIEW) and PO_VENDOR_SITES (VIEW) — supply VENDOR_NAME, VENDOR_NUMBER, and VENDOR_SITE_CODE.

The join condition links each prepayment record to its corresponding prepayment invoice via PREPAY_ID, then to the vendor and vendor site master data.

Key Columns

  • PAY_CURR_INVOICE_AMOUNT — the column relevant to the user's search. It is defined as NVL(AI.PAY_CURR_INVOICE_AMOUNT, AI.INVOICE_AMOUNT), meaning it returns the invoice amount expressed in the payment currency when populated, and otherwise falls back to the invoice amount. This is the amount a user would reference when determining how much of an invoice is eligible for prepayment application.
  • PREPAYMENT_FLAG — a literal discriminating column: 'PREPAYMENT' in the first UNION branch and the invoice indicator in the second, allowing consumers to filter which side of the relationship they require.
  • PREPAY_ID / PREPAYMENT_AMOUNT_APPLIED — identify the applied prepayment and the applied amount.
  • INVOICE_ID, ROW_ID, ORG_ID — primary identification, row locator, and operating unit context.
  • VENDOR_ID, VENDOR_SITE_ID, VENDOR_NAME, VENDOR_NUMBER, VENDOR_SITE_CODE — supplier identification and descriptive attributes.
  • INVOICE_NUM, INVOICE_DATE, DESCRIPTION, PAYMENT_CURRENCY_CODE, SET_OF_BOOKS_ID — invoice-level descriptive and accounting context.
  • DATE_REPORTED, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN — standard audit columns.

Common Use Cases and Queries

Typical uses include supplier prepayment reconciliation, identifying invoices available for prepayment application, and driving the APXIWPAA form logic. A representative query filtering invoices by their payment-currency amount:

  • SELECT invoice_num, vendor_name, PAY_CURR_INVOICE_AMOUNT FROM APPS.AP_INVOICE_PREPAYS_V WHERE PREPAYMENT_FLAG = 'INVOICE' AND PAY_CURR_INVOICE_AMOUNT > 0;
  • Retrieve applied prepayments for a vendor: SELECT vendor_name, prepay_id, PREPAYMENT_AMOUNT_APPLIED FROM APPS.AP_INVOICE_PREPAYS_V WHERE vendor_id = :p_vendor_id AND PREPAYMENT_FLAG = 'PREPAYMENT';

Because ORG_ID is exposed, queries should generally be constrained to the current operating unit to respect multi-org security.