Search Results ap_currency_group_s




Overview

The APPS.AP_AUTOSELECT_PKG package body implements Oracle Payables' invoice auto-selection engine within Oracle E-Business Suite 12.1.1 and 12.2.2. Its business purpose is to evaluate open invoices against a stored set of selection criteria and build the working set of invoices that a Payables Batch Payment process will subsequently pay. In Payables terminology this is the "AutoSelect" program: an operator defines criteria in the Payment Batch window, and this package applies those criteria to candidate invoices, populating the selected and unselected invoice tables that drive downstream payment creation, formatting, and remittance advice generation.

The package operates strictly within the APPS schema and is classified as OTHER in the ETRM register, rather than as a public API. It is therefore an internal implementation package, though the procedures are callable from custom code and concurrent programs. The body depends on the AP_INV_SELECTION_CRITERIA_S sequence and the AP_INV_SELECTION_CRITERIA_ALL table, which together hold the persisted selection criteria the user searched for. It also relies on FND_API, FND_MSG_PUB, and FND_LOG for error handling and diagnostics, and on the IBY payment infrastructure views for payee and disbursement validation.

Key Procedures and Functions

ETRM documents ten procedures and functions in this package body. Their names and roles are as follows.

  • SELECT_INVOICES — the core engine. It reads the active selection criteria, scans candidate invoices for eligibility, and inserts the qualifying rows into the selected-invoices structures while excluding those that fail validation.
  • REMOVE_INVOICES — reverses or prunes invoices from a selection, supporting manual refresh and removal operations against an in-progress batch.
  • CANCEL_BATCH — clears the selected state associated with a payment batch when the batch is cancelled, returning invoices to an unselected status.
  • RECALCULATE — recomputes derived amounts, such as discounts, interest, and payment totals, after selection changes alter the candidate set.
  • SELECTION_CRITERIA_REPORT — produces the report output describing the criteria used and the outcome of a selection run.
  • PRORATED_AWT_GROSS_AMT — computes the gross amount basis for prorated withholding tax application across grouped invoices.
  • AWT_SPECIAL_ROUNDING — applies the rounding rules used for withholding tax amounts when standard rounding is not appropriate.
  • GET_PREPAY_WITH_TAX — resolves prepayment applications that carry tax, so prepaid balances are netted correctly against invoices being paid.
  • MARK_OVERPAYMENTS — identifies and flags overpayment conditions arising from selected invoices.
  • CHECK_DOC_PAYABLE_REMOVE — validates whether a document may be removed from the selection, guarding against removal where payment or accounting constraints apply.

Tables Accessed

The package reads and writes AP_INV_SELECTION_CRITERIA_ALL (backed by the AP_INV_SELECTION_CRITERIA_S sequence) for criteria persistence, and maintains results in AP_SELECTED_INVOICES_ALL, AP_SELECTED_INVOICES, AP_UNSELECTED_INVOICES_ALL, and AP_UNSELECTED_INVOICES. Invoice master and detail data come from AP_INVOICES_ALL, AP_INVOICES, AP_INVOICES_S, AP_INVOICE_LINES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, AP_PAYMENT_SCHEDULES_ALL, and AP_INVOICE_RELATIONSHIPS. Withholding and tax processing draws on AP_AWT_GROUP_TAXES_ALL, AP_AWT_TEMP_DISTRIBUTIONS_ALL, and AP_TAX_CODES_ALL. Supplier, payment, and payee validation uses AP_SUPPLIERS, AP_PAYMENT_TEMPLATES, AP_INVOICE_PAYMENTS_ALL, IBY_ACCT_PMT_PROFILES_B, IBY_EXT_PAYEE_RELATIONSHIPS, and IBY_FD_DOCS_PAYABLE_V. Interest and period logic references AP_INTEREST_PERIODS and GL_PERIOD_STATUSES, while organization context is supplied by the AP_LE_GROUP, AP_OU_GROUP, AP_PAY_GROUP, and AP_CURRENCY_GROUP views and their sequences.

Usage Notes

AutoSelect is normally invoked from the Payables Payment Batch workflow, either through the Payment Batches form or the concurrent AutoSelect program, when a batch is defined or refreshed. Supporting procedures such as CANCEL_BATCH and RECALCULATE are called from batch maintenance actions, and SELECTION_CRITERIA_REPORT is a concurrent report. Because the package is classified as OTHER and is referenced by zero other packages, it is not a supported extension point; customizations should call it cautiously, respect the package's reliance on FND_GLOBAL for session context, and check FND_MSG_PUB for error stacks after execution. ETRM records no AP_INV_SELECTION_CRITERIA_S call signature in this body, so the sequence is used only indirectly for criteria key generation.