Search Results always_take_disc_flag




Overview

The APPS.AP_INVOICES_READY_TO_PAY_V view consolidates invoice, payment schedule, supplier, and payment-option attributes into a single denormalized result set that identifies invoices eligible for payment processing. It is owned by the APPS schema and belongs to the Payables (AP) product family. Unlike a persistent table, this object is a view with status VALID, and its principal role is to expose the criteria used by the Payables payment workbench and by external reporting or integration routines that must determine which invoices are ready for the Payment Process Request.

The view is defined with an inline subquery that joins AP_INVOICES_ALL to AP_PAYMENT_SCHEDULES and several supporting objects, most of which are exposed to APPS through synonyms (AP_HOLDS_ALL, AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, AP_PAYMENT_SCHEDULES, AP_SUPPLIER_SITES_ALL). The presence of AP_INVOICES_PKG indicates that package logic is invoked within the view definition, typically through a PL/SQL function that supplies a derived attribute such as the payable-alone indicator or a supplier remit-to value. FND_GLOBAL supplies the runtime session context (organization, user, and responsibility identifiers) required when the view is queried inside an EBS application session.

Underlying Base Objects

Several columns carry embedded bug references, including PAYMENT_FUNCTION (Bug 4965233) and PAY_ALONE (Bugs 5296127 and 7535348), indicating that the view has been patched over the 12.1.1 and 12.2.2 release cycles.

Key Columns

  • INVOICE_ID, INVOICE_NUM, INVOICE_TYPE — invoice identity and classification.
  • PAYMENT_NUM, AMOUNT_REMAINING, GROSS_AMOUNT — payment schedule balance information; AMOUNT_REMAINING defaults to 0 when NULL.
  • FUTURE_DATED_PAYMENT_CCID — the code combination identifier of the future-dated payment account associated with the supplier site. This column is the specific attribute referenced by the search term future_dated_payment_ccid, and it drives the accounting entry created when a payment is dated in the future.
  • EXCLUSIVE_PAYMENT_FLAG — defaults to 'N' when NULL; marks invoices that must be paid independently.
  • ALWAYS_TAKE_DISC_FLAG, DISCOUNT_DATE, SECOND_DISCOUNT_DATE, THIRD_DISCOUNT_DATE — discount terms used by the payment selection engine.
  • PAYMENT_METHOD_CODE, PAYMENT_FUNCTION, PAY_PROC_TRXN_TYPE_CODE — determine the payment instrument and transaction type.
  • EXTERNAL_BANK_ACCOUNT_ID — the supplier bank account used for electronic disbursement.
  • CURRENCY_CODE, SET_OF_BOOKS_ID, ORG_ID, PARTY_ID, PARTY_SITE_ID, RELATIONSHIP_ID — multi-org, ledger, and trading-partner context columns.
  • REMIT_TO_SUPPLIER_NAME, REMIT_TO_SUPPLIER_ID, REMIT_TO_SUPPLIER_SITE, REMIT_TO_SUPPLIER_SITE_ID — remit-to party attributes sourced from the payment schedule.

Common Use Cases and Queries

The view is typically used to obtain a snapshot of payables candidate invoices for a given ledger and organization, to audit future-dated payment account assignments, and to feed custom payment dashboards or third-party disbursement integrations.

To retrieve invoices with their future-dated payment accounts:

SELECT v.INVOICE_NUM, v.VENDOR_ID, v.AMOUNT_REMAINING,
       v.DUE_DATE, v.FUTURE_DATED_PAYMENT_CCID
  FROM apps.AP_INVOICES_READY_TO_PAY_V v
 WHERE v.ORG_ID = :p_org_id
   AND v.SET_OF_BOOKS_ID = :p_ledger_id
   AND v.FUTURE_DATED_PAYMENT_CCID IS NOT NULL;

To list invoices where payment terms permit early-payment discounts:

SELECT v.INVOICE_NUM, v.DISCOUNT_DATE, v.DISCOUNT_AMOUNT_AVAILABLE
  FROM apps.AP_INVOICES_READY_TO_PAY_V v
 WHERE v.ALWAYS_TAKE_DISC_FLAG = 'Y'
   AND v.DISCOUNT_AMOUNT_AVAILABLE > 0;

Because the view invokes PL/SQL in AP_INVOICES_PKG, applications should always query it from within an initialized EBS session so that FND_GLOBAL returns the correct ORG_ID and ledger context.