Search Results c_inv_due_amt_1formula




Overview

APPS.AP_APXINAGE_XMLP_PKG is the server-side PL/SQL package that backs the Oracle Payables Invoice Aging Report, a standard XML Publisher (BI Publisher) concurrent program in Oracle E-Business Suite 12.1.1 and 12.2.2. The package encapsulates the data preparation, formatting, and parameter derivation logic required to produce an aged payables listing by vendor, invoice type, and aging period. It is not an application programming interface for external callers; its API classification is OTHER, and it is referenced by zero other packages, confirming it is a report-specific support package rather than a reusable business component. The report answers the core payables question of how much is owed, to whom, and how overdue it is, using configurable aging buckets and sort orders.

Key Procedures and Functions

Seventy procedures and functions are documented. The principal entries include:

  • GET_BASE_CURR_DATA — retrieves functional currency information, including precision, minimum accounting unit, and description, used to format monetary columns consistently.
  • CUSTOM_INIT — performs report-specific initialization, setting internal globals before the main query executes.
  • GET_COVER_PAGE_VALUES — derives values displayed on the report cover page, such as company name and run-time context.
  • GET_NLS_STRINGS — loads translated literals for Yes/No/All and the "no data exists" message.
  • BEFOREREPORT and AFTERREPORT — Oracle Reports-compatible triggers that bracket execution for setup and teardown.
  • GET_COMPANY_NAME — resolves the reporting entity name for the header.
  • GET_FLEXDATA — retrieves the key flexfield segment data for the accounting flexfield context.
  • SET_ORDER_BY — builds the dynamic ORDER BY clause from the user's sort option.
  • GET_PERIOD_INFO — determines the aging period boundaries and day ranges.
  • C_CONTACT_LINEFORMULA — the formula function that produces the contact line value on the report output.
  • C_PERCENT_REMAININGFORMULA — computes the percentage remaining for each aging bucket.
  • C_INV_DUE_AMT_1FORMULA through C_INV_DUE_AMT_4FORMULA — populate the four aging bucket amount columns.
  • C_PER_V_INV_AMT_1FORMULA through C_PER_V_INV_AMT_4FORMULA — populate the corresponding percentage-of-invoice-amount columns for each bucket.

Tables Accessed

The package reads from four documented tables via APPS synonyms:

  • AP_AGING_PERIODS — the aging period header, defining the bucket set used by the report.
  • AP_AGING_PERIOD_LINES — the individual bucket definitions with from/to day ranges, sourced into the C_INV_DUE_n_RANGE variables.
  • AP_SYSTEM_PARAMETERS — supplies the set of books and related payables system options needed to scope the query.
  • HZ_PARTIES — the party master, used to resolve supplier and contact identification for the contact line.

Usage Notes

AP_APXINAGE_XMLP_PKG is invoked when the Invoice Aging Report concurrent program is submitted. The concurrent manager passes the concurrent request ID into P_CONC_REQUEST_ID; BEFOREREPORT then calls CUSTOM_INIT, GET_NLS_STRINGS, GET_BASE_CURR_DATA, GET_COMPANY_NAME, GET_PERIOD_INFO, and SET_ORDER_BY to establish globals before the report query runs. On 12.1.1 the package drives the Oracle Reports variant of the program; on 12.2.2 it drives the XML Publisher template, though the PL/SQL data model is unchanged. The numerous initialization variables declared at package level—P_SORT_OPTION, P_FORMAT_OPTION, P_AMOUNT_DUE_LOW, P_AMOUNT_DUE_HIGH, P_INVOICE_TYPE, P_PARTY_ID, and P_PERIOD_TYPE—mirror the report parameters. Custom code should not call this package directly, as its globals are single-session scoped; extensions should instead be made through the concurrent program's parameters or by copying the package for a custom report.