Search Results set_current_org_id
Overview
AR_MO_GLOBAL_CACHE is an Oracle Receivables (AR) PL/SQL package classified under Oracle E-Business Suite as an "OTHER" API. Its sole documented purpose is to store and retrieve the current context operating unit (org) identifier, and to cache operating unit attributes for reuse during a session. The package header comment describes this explicitly as "AR Specific code to store and retrieve current context org." This cache is populated through a single call (POPULATE) that reads operating unit attributes from the underlying tables, and is queried subsequently through a function (GET_ORG_ATTRIBUTES) that returns a cached data record. This design avoids repeat queries against AR_SYSTEM_PARAMETERS and FND_CURRENCIES each time the current organization's attributes are needed, which is significant in Oracle Receivables where the operating unit drives currency, set of books, and system parameter behavior.
The package carries a "noship" designation in its header, meaning it is not shipped or exposed as a public API and is intended for internal use by Oracle Receivables components. It is a global, package-level cache: the org id is held in a package variable (g_current_org_id), and the org attributes are held as a cached record. Because PL/SQL package state is session-scoped, the cache resets on each new database session.
Key Procedures and Functions
GET_CURRENT_ORG_ID— A function that returns the currently cached operating unit identifier. It is the getter counterpart toSET_CURRENT_ORG_IDand is the object most commonly searched for ("get_current_org_id"). It returns a number, reading the package variableg_current_org_id.SET_CURRENT_ORG_ID— A procedure that sets the current context operating unit identifier into the package variable. Parameter names are not invented here; per source it accepts a single org id used to store the current context.POPULATE— A procedure that retrieves operating unit attributes and stores them in the cache. Its parameter defaults to NULL, allowing the cache to be populated for a default or implied organization when none is explicitly passed.GET_ORG_ATTRIBUTES— A function that returns one row of cached data for a supplied org id. It returns the typear_mo_cache_utils.GlobalsRecord, which is the shared record structure used by the AR MO cache utilities.
Together, these four documented procedures and functions form the access layer for the AR organization context cache. SET_CURRENT_ORG_ID writes the current context; GET_CURRENT_ORG_ID reads it; POPULATE loads attributes; GET_ORG_ATTRIBUTES retrieves them.
Tables Accessed
AR_SYSTEM_PARAMETERS— The primary source of Receivables operating unit system parameters (currency, set of books context, and related defaults). These values are cached for the current org.FND_CURRENCIES— Supplies currency attributes associated with the operating unit context, cached alongside system parameters.MO_GLOB_ORG_ACCESS_TMP— A Multi-Org temporary table used in the org access and context resolution flow that the cache relies upon.PLITBLM— A PL/SQL internal table construct referenced during caching operations.
All tables are accessed via APPS synonyms, consistent with standard EBS practice. The package's heavy use of a temp access table and internal table (PLITBLM) indicates the cache is populated through Multi-Org context routines.
Usage Notes
Because AR_MO_GLOBAL_CACHE is marked "noship" and belongs to the AR MO (Multi-Org) internal code family, it is normally invoked indirectly by Oracle Receivables forms and concurrent programs that must resolve the current operating unit and its attributes during a session. Typical invocation flow is: the calling component invokes POPULATE or SET_CURRENT_ORG_ID once, then repeatedly calls GET_CURRENT_ORG_ID or GET_ORG_ATTRIBUTES to retrieve cached values rather than re-query the base tables. It is referenced by three other packages, confirming its role as a shared internal service.
Custom code should treat these routines as an unsupported, internal API. Use of GET_CURRENT_ORG_ID for diagnostic or read-only purposes is generally safe, provided the caller recognizes that the returned value depends on prior initialization of package state within the same database session. Because the cache is session-scoped, values are not preserved across connection pooling recycles, and callers must not assume the cache is populated unless POPULATE or SET_CURRENT_ORG_ID has run in that session.
-
PACKAGE: APPS.AR_MO_GLOBAL_CACHE
12.1.1
-
PACKAGE: APPS.AR_MO_GLOBAL_CACHE
12.2.2
-
PACKAGE BODY: APPS.AR_MO_GLOBAL_CACHE
12.2.2
-
PACKAGE BODY: APPS.AR_MO_GLOBAL_CACHE
12.1.1
-
APPS.AR_MO_GLOBAL_CACHE dependencies on AR_MO_GLOBAL_CACHE
12.2.2
-
APPS.AR_MO_GLOBAL_CACHE dependencies on AR_MO_GLOBAL_CACHE
12.1.1
-
APPS.AR_MO_GLOBAL_CACHE dependencies on ARP_UTIL
12.1.1
-
APPS.AR_MO_GLOBAL_CACHE dependencies on ARP_UTIL
12.2.2