Search Results get_base_currency




Overview

PO_CORE_S2 is a public PL/SQL package in the Oracle E-Business Suite Purchasing (PO) application, owned by the APPS schema and defined with AUTHID CURRENT_USER. Its certified scope is currency resolution and monetary conversion for the Oracle Purchasing and Oracle Payables data model, and it is documented as an API-classified component of type OTHER, the reserved category for internal packages that expose reusable services rather than a governed business API. The package header carries the R12 release identifier and the copyright line "$Header: POXCOC2S.pls 120.4.12020000.2 2013/03/26 06:32:52 xueche ship $", confirming it is a 12.1.1 and 12.2.2 component. Two inline tags delimit the functional blocks of the specification: one marks the Encumbrance FPJ enhancement, which introduced a centralized, bulk routine for currency conversion and rounding, and one marks the R12 MOAC enhancement, which introduced an organization-aware base currency accessor.

Key Procedures and Functions

  • GET_REQ_CURRENCY — Returns the base currency for a requisition identified by an object ID, resolved within the context of a specified operating unit. Added under bug#5092574.
  • GET_CURRENCY_INFO — Returns the precision and minimum accountable unit for a supplied currency code.
  • GET_CURRENCY_INFO_DETAILS — Extended form of the preceding procedure, additionally returning extended precision so that callers can obtain default and extended precision values. Added under bug#14376121.
  • GET_PO_CURRENCY — Returns both the base currency and the document currency for a purchase order or related object identified by an object ID.
  • GET_BASE_CURRENCY — Overloaded function. The first form returns the base currency without parameters; the second, added under the R12 MOAC enhancement, accepts an organization ID typed against PO_SYSTEM_PARAMETERS_ALL.ORG_ID to return the base currency for that organization.
  • GET_PO_CURRENCY_INFO — For a purchase order header ID, returns the currency code, rate type, rate date, and exchange rate applicable to the document.
  • ROUND_AND_CONVERT_CURRENCY — The Encumbrance FPJ bulk routine. It performs currency conversion and rounding across a set of records in a single call, accepting parallel PL/SQL tables of unique IDs, amounts, exchange rates, source and target precision and minimum accountable unit values, and a round-only flag, and returning an output table of converted amounts. It carries the historical bug references 4878973 and 3568671.

Tables Accessed

The package resolves its context from system parameter tables. PO_SYSTEM_PARAMETERS_ALL supplies the purchasing operating unit used by the MOAC-aware currency accessor. FINANCIALS_SYSTEM_PARAMETERS and FINANCIALS_SYSTEM_PARAMS_ALL supply financials-level currency and precision settings. PO_HEADERS_ALL provides document-level currency, rate type, rate date, and exchange rate data for purchase orders. PO_SESSION_GT and PO_SESSION_GT_S are session-scoped global temporary tables used to hold intermediate result sets, notably for the bulk conversion routine and, in earlier releases, for requisition currency resolution. DUAL is used for scalar evaluation, and PLITBLM is referenced for PL/SQL table operations. All access is made through APPS synonyms.

Usage Notes

PO_CORE_S2 is an internal utility layer rather than an end-user API. It is invoked from Purchasing forms and concurrent programs whenever a document currency, base currency, or conversion rate must be derived, and it is referenced by 25 other packages, which is the principal indicator of its role in the shared PL/SQL call graph. The bulk routine ROUND_AND_CONVERT_CURRENCY is specifically designed for set-based processing in encumbrance and Funds Processing Journal workloads, where per-row conversion would be prohibitively expensive; callers populate the input tables and consume a single output table. Because the package resolves currency from session and organization context, callers must establish the correct operating unit before invocation, and custom code should treat the package as an unsupported internal dependency whose signature may change without public notice.