Search Results get_dbi_sglobal_rate_init




Overview

OKI_DBI_CURRENCY_PVT is a private PL/SQL package in the APPS schema that centralizes currency conversion and rate derivation logic for Oracle Order Management and its downstream fulfillment and reporting components in Oracle E-Business Suite 12.1.1 and 12.2.2. The package name reflects its association with the Oracle Knowledgebase/Order Information (OKI) module and the DBI (database interface) layer that supplies pre-computed currency attributes to reporting views and analytical structures. Its principal business purpose is to resolve, for a given order or transaction context, the correct conversion date, functional and global exchange rates, secondary global rates, transaction-level rate type, and an annualization factor used when reporting amounts on an annualized basis. By encapsulating this logic in a single private package, Oracle ensures that currency handling is applied consistently across concurrent programs, forms, and the seeded code that calls it. The package header carries the version identifier OKIRICUS.pls 120.0 dated 2005/05/25, indicating it is a long-standing seed object that has been carried forward through successive EBS releases, including 12.1.1 and 12.2.2, with minimal header change.

Key Procedures and Functions

The package exposes twelve documented procedures and functions. All are declared PARALLEL_ENABLE and take a consistent parameter shape centered on order/charge context, currency codes, creation date, and conversion attributes.

  • GET_CONVERSION_DATE — Overloaded function that determines the effective conversion date for a transaction, given the charge identifier, transaction currency, functional currency, and creation date, with an overload that also accepts a caller-supplied conversion date and conversion type.
  • GET_DBI_GLOBAL_RATE — Returns the global (corporate) exchange rate applicable to the transaction context, used for global reporting currency translation.
  • GET_DBI_SGLOBAL_RATE — Returns the secondary global rate, supporting organizations that maintain a second reporting currency in addition to the primary global currency.
  • GET_TRX_FUNC_RATE — Returns the transaction-to-functional currency rate, the foundational rate used for local accounting.
  • GET_TRX_RATE_TYPE — Returns the rate type (for example the seeded spot or corporate rate type name) that applies to the transaction, ensuring downstream calculations reference the same rate source.
  • GET_CONVERSION_RATE — Returns a conversion rate for the supplied currency pair and context, generalizing the more specific rate getters.
  • GET_DBI_GLOBAL_RATE_INIT — Initialization routine that populates the package global variable g_func_global_rate for subsequent calls in the same session.
  • GET_DBI_SGLOBAL_RATE_INIT — Initialization routine populating g_func_sglobal_rate.
  • GET_TRX_FUNC_RATE_INIT — Initialization routine populating g_trx_func_rate.
  • GET_TRX_RATE_TYPE_INIT — Initialization routine populating g_trx_rate_type.
  • GET_ANNUALIZATION_FACTOR — Returns the factor used to annualize a periodic amount, enabling comparisons of revenue or value across periods of differing length.

Tables Accessed

The package reads reference data from OKC_RULES_B and OKC_RULE_GROUPS_B through APPS synonyms. These tables belong to the Oracle Contracts (OKC) schema and store rule definitions and rule group headers. They supply the contract- and charge-level configuration that determines which conversion date, rate type, and rate source apply to a given charge identifier. The package maintains session state in global variables g_chr_id, g_conversion_date, g_trx_func_rate, g_func_global_rate, g_func_sglobal_rate, and g_trx_rate_type so that repeated calls within a session avoid redundant lookups.

Usage Notes

Being classified as PVT (private), OKI_DBI_CURRENCY_PVT is not a public API and Oracle does not guarantee its signature across releases; custom code should invoke it only with that caveat. It is referenced by one other seeded package, which is the expected entry point for most consumers. Typical invocation occurs from order-management concurrent programs, DBI-based reporting views, and forms that must display converted amounts. The PARALLEL_ENABLE pragma indicates the functions may be executed inside parallel DML/query operations without side effects, which is why initialization is separated into the four _INIT routines. In 12.2.2 the package behaves as in 12.1.1 because currency conversion semantics are unchanged by the online-patcher architecture.