Results for “initialize_global_rec”
2 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
PA_MULTI_CURRENCY_TXN is a public PL/SQL package in the Oracle E-Business Suite Projects (PA) module. It provides the multi-currency and intercompany processing foundation used by Oracle Projects to derive project, project functional, and accounting currency attributes, resolve rate types and rate dates, and convert transaction amounts across currency layers. In the context of Oracle EBS 12.1.1 and 12.2.2, the package functions as a central utility layer that other Projects processes call when raw transactional amounts must be translated into project currency, project functional currency, and accounting (ledger) currency before distribution and accounting generation.
The package body declares a global record structure, FI_REC_ATTRB_TYPE, which acts as a cache for Financials (FI) currency conversion calls. This cache holds the previous project identifier, expenditure organization identifier, expenditure item date, attribute, project and functional cost rate types and dates, accounting rate type and date, and the project, project functional, accounting, and denominated currency codes. By caching these values across repeated calls, the package avoids redundant rate lookups from Oracle General Ledger and the Projects rate tables — a meaningful performance consideration given that the routines are invoked row-by-row during transaction processing. Documentation for the object is classified as OTHER, and the package is referenced by at least 18 other packages, confirming its role as shared infrastructure rather than an end-user-facing component.
Key Procedures and Functions
The package exposes twelve documented procedures and functions. They fall into three logical groups.
- Currency attribute retrieval: GET_CURRENCY_ATTRIBUTES derives the set of currency attributes for a transaction, while GET_PROJ_CURR_CODE_SQL returns the SQL construct used to resolve the project currency code.
- Rate type and rate date resolution: GET_PROJ_RATE_TYPE, GET_PROJ_RATE_DATE, GET_PROJFUNC_COST_RATE_TYPE, GET_DEF_PROJFUNC_CST_RATE_TYPE, GET_PROJFUNC_COST_RATE_DATE, GET_DEF_PROJFUNC_CST_RATE_DATE, GET_ACCT_RATE_DATE, and GET_DEFAULT_ACCT_RATE_DATE retrieve the applicable rate type and effective rate date for project, project functional, and accounting currency conversions. The "DEF" variants provide default values when the transaction source does not supply an override.
- Processing: GET_CURRENCY_AMOUNTS performs the actual amount derivation and caches its FI attributes in the global record. PERFORM_MC_AND_IC_PROCESSING, the routine most commonly referenced by searches for this package, orchestrates both the multi-currency and intercompany steps: it drives the currency amount derivation and applies the intercompany logic that assigns the correct provider and receiver relationships for transactions spanning different operating units or projects.
The body also contains supporting internal procedures, including PRINT_MESSAGE, which in this release is stubbed out with a NULL operation and disabled debug calls, and INITIALIZE_GLOBAL_REC, which resets the FI attribute cache before each GET_CURRENCY_AMOUNTS call.
Tables Accessed
The package reads and writes against the following tables through APPS synonyms:
- PA_EXPENDITURE_ITEMS_ALL / PA_EXPENDITURE_ITEMS — the primary transaction records whose amounts are converted and which are updated with derived currency amounts.
- PA_EXPENDITURES — parent expenditure documents providing transaction context.
- PA_PROJECTS_ALL — source of the project currency code and project-level rate attributes.
- PA_CC_DIST_LINES_ALL — distribution lines that receive converted amounts and intercompany accounting.
- PA_IMPLEMENTATIONS / PA_IMPLEMENTATIONS_ALL — implementation-level settings controlling currency and intercompany behavior.
- PA_TASKS — task context used in attribute derivation.
- PA_TRANSACTION_SOURCES — determines default rate types and rate dates.
- PLITBLM — the Projects temporary/staging table used during processing of transaction sets.
Usage Notes
PA_MULTI_CURRENCY_TXN is not invoked directly by end users. It is called from Oracle Projects transaction processing — including expenditure processing, distribution generation, and the Transfer to General Ledger flow — and is referenced by numerous other PA packages. Customers encounter it in customizations that extend or replicate Projects transaction logic, and in diagnostics where a failure in multi-currency or intercompany conversion traces back to PERFORM_MC_AND_IC_PROCESSING. Because the routine maintains global cached state, callers should re-invoke it per transaction set and avoid holding references across project, organization, or date boundaries, since stale cache entries would yield incorrect rates. Debug output is effectively suppressed in this release, so troubleshooting should rely on Projects debug logging and the underlying conversion tables rather than the package's own message calls.