Search Results get_operating_unit




Overview

JAI_CMN_UTILS_PKG is the common utility package for Oracle E-Business Suite India Localization (JAI). Its principal business function is to determine whether India Localization functionality is active for a given transactional or reporting context so that localization-specific logic executes only where appropriate. The package spec, originally authored in November 2004 under Bug 4033992 and shipped in file ja_in_util_pkg_s.sql (later jai_cmn_utils.pls), was designed to be called from India Localization triggers attached to base APPS tables. Because India Localization overlays standard EBS modules without necessarily being enabled for every operating unit, organization, or ledger, a centralized and reusable decision point was required. JAI_CMN_UTILS_PKG fulfills that role and has grown to encompass ancillary utilities — currency conversion, sequential numbering, logging, purchasing validation, and date resolution — that are shared across the JAI product family. With 107 dependent packages, it is one of the most widely referenced objects in the India Localization schema and a critical dependency for the correct operation of JAI triggers and concurrent processes in both Release 12.1.1 and 12.2.2.

Key Procedures and Functions

  • CHECK_JAI_EXISTS — The original and primary entry point. Evaluates whether India Localization functionality should be applied, using a mandatory calling-object identifier plus optional context values such as inventory organization, operating unit, and set of books. It may also accept colon-delimited value and format strings that label the supplied context. Invoked from JAI triggers on base APPS tables.
  • GET_OPERATING_UNIT — Derives or returns the operating unit relevant to the current session or transaction context. This is the procedure users most commonly search for, as operating unit resolution is a prerequisite for organization security and localization determination.
  • CURRENCY_CONVERSION — Performs currency conversion for JAI calculations, drawing on daily rate and currency definitions.
  • VALIDATE_PO_TYPE — Validates the type of a purchasing document against purchasing document style definitions.
  • GET_OPM_ASSESSABLE_VALUE — Retrieves assessable values for OPM (Process Manufacturing) related computations.
  • UPDATE_RG_SLNO — Maintains the India Localization register sequential numbering records.
  • RETURN_VALID_DATE — Returns a valid date, typically applying localization-specific date logic.
  • IF_IL_DRILLDOWN — Determines whether drilldown behavior associated with India Localization applies.
  • IS_ACCRUAL_BASIS — Indicates whether the relevant ledger or context operates on accrual basis accounting.
  • PRINT_LOG, WRITE_FND_LOG, WRITE_FND_LOG_MSG — Logging utilities that output diagnostic messages either to file or to the standard FND log facility.

Tables Accessed

The package reads and writes a focused set of reference and transactional tables through APPS synonyms. FND_CURRENCIES and GL_DAILY_RATES support CURRENCY_CONVERSION. GL_LEDGERS, GL_JE_CATEGORIES, and GL_JE_SOURCES provide ledger and journal context, including accrual-basis determination and operating unit resolution. JAI_CMN_RG_SLNOS stores the register sequential numbers maintained by UPDATE_RG_SLNO. PO_HEADERS_ALL and PO_DOC_STYLE_HEADERS underpin VALIDATE_PO_TYPE. DUAL is used for scalar evaluations, UTL_FILE for log output, and V$PARAMETER for instance-level settings. No direct base-table DML beyond the JAI sequential numbering table is documented.

Usage Notes

JAI_CMN_UTILS_PKG is normally invoked indirectly. India Localization triggers on base APPS tables call CHECK_JAI_EXISTS to gate localization logic, and dependent JAI packages call the utility procedures for currency, numbering, logging, and validation. Custom code extending India Localization should invoke the package through its APPS synonym, passing a meaningful calling-object name so that diagnostics and gating decisions remain traceable. Because the package is referenced by 107 other packages, changes to its behavior can cascade broadly; it should be treated as a shared foundation object in 12.1.1 and 12.2.2 environments where India Localization is installed.