Search Results excp_handler
Overview
The APPS.PJI_PJP_FP_CURR_WRAP package body is a currency and financial-planning wrapper utility within the Oracle EBS Projects (PJI) module. Its principal business function is to provide a stable abstraction layer over currency conversion and multi-currency accounting (MAU) APIs used by the Project Financial Planning (PJP) functions. As its internal header comment indicates ("Misc apis.. wrappers for apis to be provided by Shane"), the package was created to insulate dependent code from the underlying currency utility implementations in PJI_UTILS, allowing the developer team to rename, re-point, or refactor the base objects (for example, renaming pji_fp_xbs_accum_f_2 to pji_fp_xbs_accum_f) without breaking callers. The package is registered in ETRM 12.1.1 and 12.2.2 with an API classification of OTHER and is documented primarily as a supporting utility for global currency rates, exchange dates, and error-handling routines invoked across the Projects suite.
Key Procedures and Functions
The ETRM metadata documents fifteen program units. Their purposes are:
- GET_GLOBAL1_CURR_CODE — returns the global primary currency code by delegating to
PJI_UTILS.GET_GLOBAL_PRIMARY_CURRENCY. - GET_GLOBAL2_CURR_CODE — returns the global secondary currency code via
PJI_UTILS.GET_GLOBAL_SECONDARY_CURRENCY. - GET_GLOBAL_RATE_PRIMARY — returns the primary global exchange rate for a supplied currency and exchange date.
- GET_MAU_PRIMARY — returns the primary minimum accounting unit (MAU) value.
- GET_GLOBAL_RATE_SECONDARY — returns the secondary global exchange rate for a given currency and exchange date.
- GET_MAU_SECONDARY — returns the secondary MAU value.
- GET_RATE — a placeholder rate function returning a fixed default in the documented source.
- GET_MAU — a placeholder MAU function, likewise returning a fixed default.
- GET_WORKER_ID — resolves the effective worker identifier used by planning routines.
- GET_ENT_DATES_INFO — retrieves enterprise/entity date information used in period logic.
- GET_GLOBAL_CURRENCY_INFO — returns consolidated global currency configuration details.
- PRINT_TIME — diagnostic timing utility used for performance tracing.
- EXCP_HANDLER — central exception handler for the package's error paths.
- INIT_ERR_STACK — initialises the error stack; this is the unit most frequently referenced in the source excerpt and the object of the user's search.
- SET_TABLE_STATS — gathers or sets optimizer statistics on the supporting tables.
Tables Accessed
The package references the following APPS synonyms:
- PJI_SYSTEM_SETTINGS — the primary configuration source for global currency codes, rates, MAU, and worker identifiers consumed by the GET_GLOBAL* and GET_MAU* functions.
- PJI_TIME_ENT_PERIOD — supplies time-entry period date information for GET_ENT_DATES_INFO.
- DUAL — used for single-row scalar returns and default-value placeholders such as GET_RATE and GET_MAU.
Usage Notes
PJI_PJP_FP_CURR_WRAP is an internal wrapper rather than a user-facing API. It is referenced by 13 other packages, making it a shared dependency for downstream Projects currency and financial-planning logic. It is typically invoked indirectly from concurrent programs and forms that perform multi-currency aggregation for project planning, rather than being called directly from custom code. INIT_ERR_STACK, in particular, is called at the start of PL/SQL blocks (as shown in GET_WORKER_ID) to prepare the error stack before exception-prone processing begins — a convention that makes the string "init_err_stack" a common search term for developers troubleshooting error propagation in Projects currency routines.