Search Results check_partial
Overview
APPS.AP_UTILITIES_PKG is a shared PL/SQL utility package in the Oracle E-Business Suite Payables (AP) module. It provides a centralized library of helper routines used across Payables forms, concurrent programs, and dependent APIs to perform common calculation, validation, lookup, and caching tasks that would otherwise be duplicated in every calling program. The package is classified as OTHER in the ETRM and is owned by APPS. It is referenced by 108 other packages, confirming its role as a foundational dependency within the Payables code base. The source header indicates continuous maintenance, with the most recent attribution dated 2008 and internal bug references for natural account segment caching, period name caching, asset book caching, and currency data caching.
The specific reference to ap_round_currency in the search that surfaced this package points to one of its most frequently used numeric utilities: currency-aware rounding of monetary amounts. Rounding behavior in Payables must respect the precision and minimum accountable unit defined for each currency, and this package encapsulates that logic rather than leaving it to individual callers.
Key Procedures and Functions
ETRM documents 50 procedures and functions. The principal routines include:
- AP_ROUND_CURRENCY — The routine most relevant to users searching on ap_round_currency. It accepts an amount and a currency code and returns the amount rounded in accordance with the currency's defined precision and minimum accountable unit. Cache-backed currency metadata supports this operation.
- AP_ROUND_TAX and AP_ROUND_NON_REC_TAX — Rounding routines specific to tax and non-recoverable tax amounts.
- AP_ROUND_PRECISION — General precision-based rounding helper.
- LEDGER_ASSET_BOOK — Returns the asset book associated with a given ledger, used in the interface between Payables and Assets.
- AP_GET_DISPLAYED_FIELD — Retrieves a displayed field value from lookup configuration for a supplied lookup type and code.
- NET_INVOICE_AMOUNT — Computes the net amount of an invoice.
- GET_CURRENT_GL_DATE, GET_GL_PERIOD_NAME, GET_OPEN_GL_DATE, GET_ONLY_OPEN_GL_DATE — Date and period resolution routines, several of which are backed by cached period status data.
- GET_EXCHANGE_RATE — Retrieves the applicable exchange rate for conversions.
- SET_PROFILE, AP_GET_MESSAGE, GET_WINDOW_TITLE, GET_WINDOW_SESSION_TITLE — Profile option and UI-related helpers.
- OVERLAY_SEGMENTS and OVERLAY_SEGMENTS_BY_GLDATE — Build accounting flexfield combinations from segment values, with the second variant keyed on GL date.
- CHECK_PARTIAL and IS_CCID_VALID — Validation helpers for partial status and code combination identifiers.
The package declares several cached collection types, including number_table_type, natural account segment, current period name, open period name, asset book code, and FND currency record types, used to avoid repetitive queries.
Tables Accessed
The package reads and writes data through APPS synonyms, including:
- FND_CURRENCIES — Source of currency code, precision, and minimum accountable unit for AP_ROUND_CURRENCY.
- GL_PERIOD_STATUSES — Source for period name caching and open-period determination.
- GL_CODE_COMBINATIONS and GL_LEDGER_SEGMENT_VALUES — Accounting flexfield segment and combination validation.
- AP_INVOICES, AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS, AP_INVOICE_LINES, AP_INVOICE_LINES_ALL — Invoice and line level data used in amount and net calculation routines.
- FA_BOOK_CONTROLS — Asset book codes for LEDGER_ASSET_BOOK.
- AP_AE_HEADERS, AP_ENCUMBRANCE_LINES, AP_ENCUMBRANCE_LINES_ALL, AP_HOLDS_ALL, AP_INTERFACE_REJECTIONS — Supporting Payables transaction and interface data.
Usage Notes
AP_UTILITIES_PKG is invoked from Payables forms, concurrent programs, and other PL/SQL packages—particularly the 108 dependent packages identified in ETRM. Custom code that needs to round a monetary amount for a specific currency should call AP_ROUND_CURRENCY rather than applying its own rounding rules, so that precision and minimum accountable unit remain consistent with standard Payables behavior. Because several routines rely on package-level cached data, callers should be aware that caching persists for the duration of the session. The pragma restrict_references directive present in the source indicates restrictions on the purity of certain functions.