Search Results pg_ar_server_patch_level
Overview
ARP_UTIL is a foundational utility package in the Oracle Receivables (AR) module of Oracle E-Business Suite, owned by the APPS schema and classified as a utility (UTIL) API in the ETRM repository for releases 12.1.1 and 12.2.2. It consolidates low-level numeric, currency, date, and debugging routines that are shared across the Receivables application stack rather than a single business transaction. Its header identifies the internal server patch level through the PG_AR_SERVER_PATCH_LEVEL variable (initialized to 1759719), and the source header (ARCUTILS.pls 120.8) confirms the package has been maintained continuously since the early 11i era.
The package's principal business value lies in currency and accounted-amount calculation. Receivables must convert entered transaction amounts to functional currency and derive the accounted (general ledger) amounts for both master and detail records, respecting currency precision and the minimum accountable unit (MAU). ARP_UTIL centralizes this logic so that hundreds of dependent programs produce numerically consistent results. The ETRM records show ARP_UTIL is referenced by 221 other packages, making it one of the most widely depended-upon utilities in the AR module. It also supplies generic helpers for GL date validation, descriptive flexfield validation, and diagnostic tracing.
Key Procedures and Functions
The documented interface exposes 34 procedures and functions, organized into three functional groups.
Debugging utilities. ENABLE_DEBUG (with an optional buffer size overload), DISABLE_DEBUG, and DEBUG provide controllable trace output that can be directed to a buffer and later inspected. PRINT_FCN_LABEL and PRINT_FCN_LABEL2 emit standardized function labels into the debug stream, allowing developers to trace execution paths. AR_SERVER_PATCH_LEVEL returns the packaged server patch identifier.
Amount and currency functions. FUNCTIONAL_AMOUNT converts an entered amount into functional currency using a supplied exchange rate, currency code, precision, and minimum accountable unit. FUNC_AMOUNT is a variant added under Bug 501260 that performs the same conversion for a specific rounding case. CALC_DYNAMIC_AMOUNT—the routine the user searched for—computes an amount from an input amount, exchange rate, and currency code, performing dynamic conversion and rounding behavior. CURRROUND rounds an amount to the precision of the specified currency. CALC_ACCTD_AMOUNT is the PL/SQL equivalent of the PRO*C routine aracc(); it determines the accounted amounts for both master and detail records, taking currency, precision, MAU, rate, type, and source amounts as inputs and returning calculated accounted values. CALC_ACCOUNTED_AMOUNT and CALC_ACCTD_AMOUNT_TEST provide alternate and test variants of the same logic. SET_BUCKETS supports amount bucketing or aging-style categorization.
Validation and control utilities. VALIDATE_AND_DEFAULT_GL_DATE, VALIDATE_GL_DATE, and IS_GL_DATE_VALID enforce GL date rules and supply defaults. VALIDATE_DESC_FLEXFIELD validates descriptive flexfield combinations. GET_ID is a generic identifier retrieval helper, and CLOSE_CURSOR manages cursor lifecycle for callers.
Tables Accessed
The package reads configuration and setup data through APPS synonyms. FND_CURRENCIES supplies currency precision and MAU used by the amount functions. AR_SYSTEM_PARAMETERS and AR_SYSTEM_PARAMETERS_ALL provide Receivables system options. GL_DAILY_CONVERSION_TYPES supports exchange rate type lookups. AR_RECEIPT_METHODS, CE_BANK_ACCOUNTS, and IBY_EXT_BANK_ACCOUNTS are consulted for receipt method and bank account context. HZ_CUSTOMER_PROFILES, HZ_CUST_ACCOUNTS, and HZ_PARTIES supply Trading Community Architecture (TCA) party and customer data. RA_CUSTOMER_TRX and RA_CUSTOMER_TRX_LINES are the core Receivables transaction tables used when computing transaction amounts, while RA_INTERFACE_LINES_GT is the interface global temporary table used during AutoInvoice processing. FND_DESCRIPTIVE_FLEXS and FND_PRODUCT_INSTALLATIONS support flexfield validation and product installation checks. Most access is read-only, consistent with a utility role.
Usage Notes
ARP_UTIL is invoked as an internal dependency rather than through direct user navigation. Its heaviest consumers are Receivables business logic packages, forms, and concurrent programs such as AutoInvoice, which call CALC_DYNAMIC_AMOUNT, CALC_ACCTD_AMOUNT, and FUNCTIONAL_AMOUNT to derive functional and accounted amounts. The debug procedures are typically enabled by developers or support engineers during troubleshooting to trace execution without modifying dependent code. Custom extensions should call these routines rather than reimplementing currency rounding, because the MAU and precision handling encodes Receivables-specific rules. Because the package is referenced by 221 other packages, signature changes carry broad regression risk; release 12.2.x deployments should verify the patch level returned by AR_SERVER_PATCH_LEVEL when diagnosing rounding discrepancies across releases.