Search Results ego_sctx




Overview

EGO_SCTX is a PL/SQL package body owned by the APPS schema that functions as a session context utility for the Oracle E-Business Suite. Its name, combining the EGO (Oracle Product Information / E-Business Object) prefix with "SCTX" (session context), reflects its central role: maintaining and exposing the identifying attributes of the current user session within the EGO application family. Rather than implementing a business transaction, EGO_SCTX provides the plumbing that other packages and forms rely upon to determine who is acting, which party (organization or person) is in scope, and which object record is currently being manipulated.

The package is classified under the OTHER API category and is documented as VALID in the ETRM repository for release 12.2.2. It depends on standard Oracle EBS infrastructure packages including FND_API, FND_GLOBAL, FND_LANGUAGES, FND_MESSAGE, FND_MSG_PUB, and the PL/SQL standard objects PLITBLM and STANDARD. Notably, it is referenced by eight other packages, confirming that it acts as a shared, low-level dependency rather than an application entry point.

Key Procedures and Functions

The documented interface comprises fourteen procedures and functions organized around a setter/getter pattern for session attributes:

  • GET_USER_ID / SET_USER_ID — Retrieve and assign the identifier of the user associated with the current session, typically the FND user acting on the object.
  • GET_PARTY_ORG_ID / SET_PARTY_ORG_ID — Retrieve and assign the party organization identifier placed in session scope, used to constrain operations to a specific party organization.
  • GET_PARTY_PERSON_ID / SET_PARTY_PERSON_ID — Retrieve and assign the party person identifier for the session, supporting person-level context.
  • GET_CTX / SET_CTX — Retrieve and assign the overall session context value, providing a single access point for the assembled context.
  • GET_OBJECT_NAME / SET_OBJECT_NAME — Retrieve and assign the name of the object currently in context.
  • GET_OBJECT_KEY / SET_OBJECT_KEY — Retrieve and assign the key value identifying the specific object instance in context.
  • SET_SESSION_LANGUAGE — Assign the language for the session, enabling language-sensitive processing by dependent packages.

Tables Accessed

According to the documented dependency metadata, EGO_SCTX references only two tables through APPS synonyms: FND_LANGUAGES and PLITBLM. FND_LANGUAGES is the Oracle Applications view of installed languages and is accessed in support of the SET_SESSION_LANGUAGE routine and any language validation or lookup the package performs. PLITBLM is the standard Oracle PL/SQL table of line/break mappings used internally by DBMS_OUTPUT and similar utilities; its presence indicates that the package body may contain or invoke output-oriented PL/SQL constructs. No application transaction tables are recorded as dependencies, which is consistent with a utility package whose state is largely held in package variables rather than persisted data.

Usage Notes

EGO_SCTX is normally invoked indirectly. Application forms, particularly those within the EGO product family, and other PL/SQL APIs call the SET_* routines at the start of a session or transaction to populate context, then call the corresponding GET_* routines to obtain the current user, party organization, party person, object name, object key, or context value. Custom code extending EGO functionality should follow the same convention: establish context through the setter procedures rather than reading values independently, ensuring that downstream packages observe a consistent session state.

Because the package is referenced by eight other database objects and itself depends on FND_GLOBAL, FND_MESSAGE, and FND_MSG_PUB, changes to its public interface carry a broad impact. Any modification should be assessed against all dependent packages, and the standard FND message and API utilities should be preserved to maintain error handling behavior in releases 12.1.1 and 12.2.2.