Search Results p_location




Overview

XLA_CONTEXT_PKG is the application context management package for the Oracle E-Business Suite Subledger Accounting (XLA) product family. Its documented purpose is to set attribute values for the application context namespace "XLA," which is the session-level namespace used across Oracle EBS to expose runtime parameters to database views, Virtual Private Database policies, and SQL predicates that depend on the current session state.

The package body is registered under the APPS schema and classified as OTHER in the ETRM 12.2.2 inventory. The package operates as a thin wrapper around Oracle's built-in DBMS_SESSION and DBMS_LOCK packages, using DBMS_SESSION.SET_CONTEXT to write namespace attributes and related facilities to read, increment, and clear them. It is foundational infrastructure: the ETRM metadata records that it is referenced by 49 other packages, meaning a substantial portion of the XLA and general ledger processing stack depends on the context values this package establishes.

The source header (xlacmctx.pkb, version 120.7, last shipped 12-Jan-2011) confirms the package was created in January 2003 and extended in April 2003 with the accounting error context routines. A further revision in October 2005 supported Multi-Period Accounting (MPA) report changes, which accounts for the MPA accrual context routines present in the documented procedure list.

Key Procedures and Functions

The 25 documented routines fall into functional groups that map to the distinct context attributes the package maintains.

Tables Accessed

The package does not reference application tables directly. ETRM documents only two dependencies, both via APPS synonyms: DBMS_LOCK and DBMS_SESSION. DBMS_SESSION provides the SET_CONTEXT, CLEAR_CONTEXT, and related calls that read and write namespace attributes; DBMS_LOCK is used to serialize access to context state so that concurrent sessions cannot corrupt shared attribute values. Because all state is held in the session namespace rather than persisted to a table, the package is lightweight but its effects are session-scoped and lost when the session ends.

Usage Notes

XLA_CONTEXT_PKG is an infrastructure package rather than a user-facing API. It is invoked programmatically by the 49 dependent packages identified in the ETRM metadata, typically at the start of subledger accounting processing to populate the XLA namespace, and again at the end of processing to clear it. Concurrent programs that run Create Accounting and related XLA processes rely on these routines to make request identifiers, event counts, event set identifiers, accounting error identifiers, and MPA accrual values visible to SQL executed later in the same session.

Because the values are session-scoped, callers must set the context in the same session that subsequently queries it; setting context in a parent session does not propagate to a child session or to a separate database connection. Integration and custom code should mirror the standard pattern: set the relevant context at the beginning of the unit of work, read or increment it as processing proceeds, and always clear it on completion to avoid stale state affecting later operations in a reused connection.