Search Results invoice_includes_prepay_flag
Overview
The APPS.AP_UNAPPLY_PREPAYS_V view is a Payables reporting object in Oracle E-Business Suite 12.1.1 and 12.2.2 that exposes unapplied or reversed prepayment application lines. It reads from AP_INVOICE_LINES and joins upward to AP_INVOICES_ALL, supplier, purchasing, and receiving entities to present each prepayment application as a self-contained row. The view is used primarily by the Payables Unapply Prepayments form and by concurrent programs and integrations that must identify which prepayment amounts were applied to a standard invoice, how much tax was included, and how much of the original prepayment remains available.
The name reflects its filter logic: rows are restricted to lines where the line type lookup code equals PREPAY, the amount is negative, and the discarded flag is not Y. A negative amount on a PREPAY-type line represents the reversal or unapplication of a prior prepayment application. Consequently, the view helps users reconcile prepayment balances, reverse erroneous applications, and report outstanding prepayment amounts by supplier, purchase order, or receipt.
Underlying Base Objects
The view is defined over the following documented base objects:
- AP_INVOICE_LINES — the driving table, aliased AIL; supplies the invoice line, prepay line, amount, tax, accounting date, period, and ORG_ID.
- AP_INVOICES_ALL — aliased AI; joined on PREPAY_INVOICE_ID to supply the prepayment invoice number, vendor, and vendor site.
- AP_PREPAY_UTILS_PKG — supplies the GET_LINE_PREPAY_AMT_REMAINING function, which computes the unapplied balance for the referenced prepayment line.
- PO_VENDORS and PO_VENDOR_SITES_ALL — supply supplier name, supplier number, and vendor site code.
- PO_HEADERS_ALL — outer-joined via PO_HEADER_ID to supply the purchase order number.
- RCV_TRANSACTIONS, RCV_SHIPMENT_LINES, and RCV_SHIPMENT_HEADERS — outer-joined through RCV_TRANSACTION_ID and shipment line to surface the receipt number for receipt-matched prepayments.
- FND_GLOBAL — referenced in the underlying metadata for session context (organization and user) resolution.
The outer joins on PO_HEADERS_ALL and the receiving tables allow non-purchase-order and non-receipt prepayments to remain visible, so the view is not limited to matched transactions.
Key Columns
- ROW_ID — the ROWID of the underlying AP_INVOICE_LINES row; useful for direct updates or deletes in correction scripts.
- INVOICE_ID / INVOICE_LINE_NUMBER — identify the applied or unapplied line.
- PREPAY_INVOICE_ID / PREPAY_LINE_NUMBER — identify the originating prepayment invoice and line.
- PREPAY_AMOUNT_APPLIED — the negative of the line amount less included tax; represents the amount being unapplied.
- TAX_AMOUNT_APPLIED — the recovered plus non-recoverable tax on the application, nulled out when zero.
- PREPAY_AMOUNT_REMAINING — computed by AP_PREPAY_UTILS_PKG for the prepayment line, showing the still-unapplied balance.
- INVOICE_INCLUDES_PREPAY_FLAG — the flag answering the search term
invoice_includes_prepay_flag; indicates whether the invoice line includes a prepayment component. - ACCOUNTING_DATE, PERIOD_NAME, SET_OF_BOOKS_ID — accounting context for reporting by period or ledger.
- PO_LINE_LOCATION_ID, PO_DISTRIBUTION_ID, RCV_TRANSACTION_ID, ORG_ID — supporting purchasing and receiving linkage.
- PREPAY_NUMBER, VENDOR_ID, VENDOR_SITE_ID, PO_NUMBER, VENDOR_NAME, VENDOR_NUMBER, VENDOR_SITE_CODE, RECEIPT_NUMBER — descriptive attributes for reporting and reconciliation.
Common Use Cases and Queries
Typical scenarios include auditing unapplied prepayments, reversing incorrect applications, and reconciling supplier prepayment balances. A representative query follows:
SELECT prepay_number, prepay_line_number, invoice_id, prepay_amount_applied,
prepay_amount_remaining, invoice_includes_prepay_flag
FROM apps.ap_unapply_prepays_v
WHERE vendor_id = :p_vendor_id
AND accounting_date BETWEEN :p_start AND :p_end
ORDER BY accounting_date, prepay_number;
For period-based reporting, replace the date predicate with period_name = :p_period and aggregate PREPAY_AMOUNT_APPLIED by SET_OF_BOOKS_ID. For PO-linked prepayments, filter on PO_NUMBER IS NOT NULL or join on PO_DISTRIBUTION_ID. When correcting data, always reference ROW_ID rather than reconstructing a composite key, and drive any update through the standard Payables unapply prepayment process to preserve accounting integrity.
-
View: AP_UNAPPLY_PREPAYS_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:SQLAP.AP_UNAPPLY_PREPAYS_V, object_name:AP_UNAPPLY_PREPAYS_V, status:VALID, product: AP - Payables , implementation_dba_data: APPS.AP_UNAPPLY_PREPAYS_V ,
-
View: AP_UNAPPLY_PREPAYS_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:SQLAP.AP_UNAPPLY_PREPAYS_V, object_name:AP_UNAPPLY_PREPAYS_V, status:VALID, product: AP - Payables , implementation_dba_data: APPS.AP_UNAPPLY_PREPAYS_V ,
-
View: AP_VIEW_PREPAYS_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:SQLAP.AP_VIEW_PREPAYS_V, object_name:AP_VIEW_PREPAYS_V, status:VALID, product: AP - Payables , implementation_dba_data: APPS.AP_VIEW_PREPAYS_V ,
-
View: AP_VIEW_PREPAYS_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:SQLAP.AP_VIEW_PREPAYS_V, object_name:AP_VIEW_PREPAYS_V, status:VALID, product: AP - Payables , implementation_dba_data: APPS.AP_VIEW_PREPAYS_V ,
-
View: APFV_AP_INVOICE_LINES
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:SQLAP.APFV_AP_INVOICE_LINES, object_name:APFV_AP_INVOICE_LINES, status:VALID, product: AP - Payables , description: Business View , implementation_dba_data: APPS.APFV_AP_INVOICE_LINES ,
-
View: AP_INVOICE_LINES_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:SQLAP.AP_INVOICE_LINES_V, object_name:AP_INVOICE_LINES_V, status:VALID, product: AP - Payables , implementation_dba_data: APPS.AP_INVOICE_LINES_V ,
-
View: AP_INVOICE_LINES_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:SQLAP.AP_INVOICE_LINES_V, object_name:AP_INVOICE_LINES_V, status:VALID, product: AP - Payables , implementation_dba_data: APPS.AP_INVOICE_LINES_V ,
-
View: AP_INVOICE_DISTS_ALL_MRC_V
12.1.1
product: AP - Payables , description: MULTI-ORG MRC view , implementation_dba_data: Not implemented in this database ,
-
View: AP_INVOICE_DISTS_ALL_MRC_V
12.2.2
product: AP - Payables , description: MULTI-ORG MRC view , implementation_dba_data: Not implemented in this database ,
-
View: AP_INVOICE_DISTS_MRC_V
12.1.1
product: AP - Payables , description: SINGLE-ORG MRC view , implementation_dba_data: Not implemented in this database ,
-
View: AP_INVOICES_INTERFACE_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:SQLAP.AP_INVOICES_INTERFACE_V, object_name:AP_INVOICES_INTERFACE_V, status:VALID, product: AP - Payables , implementation_dba_data: APPS.AP_INVOICES_INTERFACE_V ,
-
View: AP_INVOICE_DISTS_MRC_V
12.2.2
product: AP - Payables , description: SINGLE-ORG MRC view , implementation_dba_data: Not implemented in this database ,
-
View: AP_INVOICES_INTERFACE_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:SQLAP.AP_INVOICES_INTERFACE_V, object_name:AP_INVOICES_INTERFACE_V, status:VALID, product: AP - Payables , implementation_dba_data: APPS.AP_INVOICES_INTERFACE_V ,
-
View: AP_TAX_LINES_SUMMARY_V
12.1.1
product: AP - Payables , implementation_dba_data: Not implemented in this database ,
-
View: AP_TAX_LINES_SUMMARY_V
12.2.2
product: AP - Payables , implementation_dba_data: Not implemented in this database ,