Search Results return_sob_curr




Overview

JAI_PLSQL_CACHE_PKG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema and classified as an OTHER API. Its principal business function is to provide a session-level PL/SQL cache for frequently requested functional currency and ledger context attributes, avoiding repeated, redundant queries against core General Ledger, Human Resources, and inventory organization tables. The package header "$Header: jai_plsql_cache.pls 120.3 2006/05/26" and the AUTHID CURRENT_USER declaration indicate it operates under the calling user's privileges and was introduced as part of the JAI (Oracle Financials for India) product family in release 11i, remaining available in EBS 12.1.1 and 12.2.2.

The central data structure is the record type func_curr_details, which aggregates ledger_id (Set of Books), currency_code, chart_of_accounts_id, organization_code, legal_entity, organization_name, minimum_accountable_unit, and precision. A PL/SQL table type func_curr_det_tab indexed by BINARY_INTEGER is declared as the package global g_get_func_curr, forming the in-memory storefront of the cache. This design allows India Localization logic to resolve the functional currency context of an organization with a single lookup rather than issuing a chain of cursor queries per call.

Key Procedures and Functions

  • READ_CACHE — Retrieves a previously populated record from the package global cache table for a given organization or ledger key. It serves as the primary entry point for consumers that need already-cached currency and organization details, returning null or prompting a database fetch when no cached entry exists.
  • WRITE_CACHE — Populates the in-memory cache table with a func_curr_details record, storing ledger, currency, chart of accounts, organization, legal entity, and currency precision attributes for subsequent READ_CACHE calls during the same session.
  • READ_FROM_DB — Performs the actual database retrieval when data is not present in the cache. It consolidates the package's internal cursors (get_inv_org, get_OU, get_func_curr, get_curr_details) to resolve organization and operating unit ledgers, functional currency, and currency precision from the underlying tables.
  • RETURN_SOB_CURR — Returns the Set of Books (ledger) identifier and its associated functional currency for the requested context. This is the routine most directly associated with the search term "return_sob_curr" and is typically the function invoked by India Localization tax, reporting, and accounting programs that require Set of Books currency determination.

Tables Accessed

Through APPS synonyms, the package references:

  • GL_LEDGERS — source of ledger_id (Set of Books), currency_code, and chart_of_accounts_id.
  • FND_CURRENCIES — source of minimum_accountable_unit and precision for currency rounding behavior.
  • HR_ALL_ORGANIZATION_UNITS — provides organization identifiers and organization name.
  • HR_ORGANIZATION_INFORMATION — supplies legal entity attributes (org_information2).
  • MTL_PARAMETERS — supplies the inventory organization_code where the organization is an inventory org.
  • PLITBLM — the standard EBS PL/SQL table index-by table used for in-memory caching of row data.

Usage Notes

The package is referenced by 39 other packages across the APPS schema, indicating broad internal reuse within the India Localization stack. It is not an end-user-facing API and is not typically invoked directly from Oracle Forms or concurrent program parameters; instead, it is called by other PL/SQL packages and programs that need economical, repeatable access to ledger functional currency and organization context. Because the cache is session-scoped, entries persist only for the duration of the database session, and callers should be aware that READ_FROM_DB will repopulate the cache when entries are absent or stale. In EBS 12.2.2 environments, the ledger terminology supersedes the 11i Set of Books nomenclature, but both are represented in the ledger_id field for backward compatibility.