Search Results set_org_context_in_api
Overview
AR_MO_CACHE_UTILS is an internal Oracle E-Business Suite PL/SQL package body owned by the APPS schema that supports the Order Management and Accounts Receivable integration commonly known as "MO" (Multi-Org / Order Management) processing. Its principal role is to centralize the retrieval and caching of global, organizational, and installation-dependent attributes that Receivables and Order Management routines require repeatedly during a session. Rather than forcing every caller to re-query profile options, system parameters, currency definitions, and operating unit context, AR_MO_CACHE_UTILS resolves these values once and exposes them through lightweight accessor routines.
In EBS 12.1.1 and 12.2.2 the package remains a VALID object in the APPS schema. The ETRM metadata classifies its API type as OTHER, confirming that it is a supporting infrastructure package rather than a public, externally documented API. It is referenced by 22 other packages and is itself dependent on foundational utilities such as ARP_STANDARD, ARP_UTIL, ARP_GLOBAL, MO_GLOBAL, MO_UTILS, FND_API, and FND_MESSAGE, indicating that it sits close to the core of the Receivables/Order Management data flow.
Key Procedures and Functions
The documented package exposes four procedures and functions:
- RETRIEVE_GLOBALS — Populates the package's cached global variables. It is the primary initialization routine, gathering the runtime environment values (organization context, profile-derived defaults, and setup flags) that the remaining routines depend upon.
- TM_INSTALLED — Determines whether the Oracle Trade Management (OZF/ZX) modules are installed in the current environment. This allows callers to conditionally execute Trade Management-related logic without failing on installations where those products are absent.
- TM_DEFAULT_SETUP — Returns Trade Management default setup information, providing callers with the configured defaults required when Trade Management processing is active.
- SET_ORG_CONTEXT_IN_API — Establishes the correct Multi-Org (operating unit / organization) context before an API is invoked, ensuring that subsequent reads and writes are applied against the intended organization.
No parameter lists are documented for these routines; callers should rely on the published ETRM signature rather than on assumption.
Tables Accessed
The package reads from several base and reference tables through APPS synonyms:
- AR_SYSTEM_PARAMETERS — Supplies Receivables system option values that influence caching and default behavior.
- FND_CURRENCIES — Provides currency definitions used when resolving monetary attributes.
- HR_ORGANIZATION_INFORMATION — Supplies organization classification and operating unit details required to set Multi-Org context.
- JTF_RS_SALESREPS — Resolves sales representative information associated with the current organization or transaction.
- ZX_PRODUCT_OPTIONS — Determines E-Business Tax / Trade Management product option settings that drive conditional logic.
The package also depends on GL_SETS_OF_BOOKS and AR_SYSTEM_PARAMETERS for ledger and Receivables setup values, consistent with its role as a setup-caching utility.
Usage Notes
AR_MO_CACHE_UTILS is an internal utility. It is not typically invoked from a form or concurrent program by name; instead it is called by the 22 dependent packages that perform Receivables and Order Management processing. Because it caches session-scoped globals, it is normally called once at the start of an API or batch run so that downstream routines can read cached values cheaply. SET_ORG_CONTEXT_IN_API should be invoked before any operation that is organization-sensitive, particularly in Multi-Org environments. Custom code that calls these routines should treat them as private infrastructure and avoid depending on undocumented behavior.