Search Results get_sob_currency




Overview

OKC_CURRENCY_API is a public PL/SQL API in the APPS schema that centralizes currency, set of books (SOB), and operating unit (OU) resolution logic for Oracle EBS contracts and related modules. Rather than requiring each caller to query FND_CURRENCIES or HR organization tables directly, the package encapsulates the derivation of functional currency, chart-of-accounts currency, exchange rates, and euro-conversion decisions behind a stable set of functions. It is classified as an API in ETRM for release 12.2.2 and is referenced by 27 other packages, which indicates that it is a shared foundation utility rather than a component tied to a single subsystem. The package also exposes a set of named exceptions, including NO_RATE and INVALID_CURRENCY, allowing callers to handle rate and currency validation failures without inspecting return codes.

Key Procedures and Functions

The thirteen documented routines fall into four functional groups.

  • GET_SOB_CURRENCY — accepts a set of books identifier and returns the currency code associated with that SOB. This is the routine surfaced by the search term get_sob_currency.
  • GET_OU_CURRENCY — returns the functional currency for an operating unit; when no organization is supplied, it resolves the current OU using the FND_Profile Org_ID setting.
  • GET_OU_SOB and GET_OU_SOB_NAME — derive the SOB identifier or SOB name for a given (or current) operating unit.
  • GET_RATE, VALIDATE_CONVERSION_ATTRIBS, CONVERT_AMOUNT, and IS_USER_RATE_ALLOWED — retrieve exchange rates for a from/to currency pair, date, and conversion type; validate the supplied conversion parameters; convert a monetary amount; and determine whether a user-defined rate type is permissible. IS_USER_RATE_ALLOWED returns BOOLEAN and defaults the effective date to SYSDATE where applicable.
  • GET_INFO, GET_CURRENCY_TYPE, GET_EURO_CURRENCY_CODE, and IS_EURO_CONVERSION_NEEDED — supply descriptive currency attributes and support euro-related conversion logic for legacy currency pairs.

Tables Accessed

The package operates against three base tables exposed through APPS synonyms. FND_CURRENCIES supplies currency definitions, precision, and currency type attributes used by GET_INFO, GET_CURRENCY_TYPE, and the euro-related functions. HR_ALL_ORGANIZATION_UNITS provides the operating unit definition used to resolve the organization context in GET_OU_CURRENCY, GET_OU_SOB, and GET_OU_SOB_NAME. HR_ORGANIZATION_INFORMATION holds the organization-level classifications and set-of-books assignments that link an operating unit to its ledger and currency. The package performs read-only lookups: no insert, update, or delete activity is documented.

Usage Notes

OKC_CURRENCY_API is typically invoked from PL/SQL inside contract authoring forms, concurrent programs, and custom extensions that must present amounts in the correct functional currency or convert values between currencies at a controlled rate type. Because many of its functions accept a defaulted organization identifier, callers running in a form session with the Org_ID profile set can omit the parameter and obtain the current operating unit's currency or ledger automatically. Callers should expect the NO_RATE and INVALID_CURRENCY exceptions and should not assume a rate exists for every currency pair and date. Given its API classification and its use by 27 dependent packages, custom code should call these functions rather than querying FND_CURRENCIES, HR_ALL_ORGANIZATION_UNITS, or HR_ORGANIZATION_INFORMATION directly, so that changes to the underlying resolution logic are inherited automatically.