Search Results set_attr_value




Overview

AS_SEC_CONTEXT is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that provides a lightweight, session-scoped mechanism for storing and retrieving named security context attributes. It functions as an in-memory key/value store bound to the current database session, allowing callers to register attribute name/value pairs and later resolve those values by name. The package is declared with AUTHID CURRENT_USER, so it executes with the privileges of the invoking user rather than the definer, and it is internally supported by a table of records (sec_attr_record) and a corresponding PL/SQL collection type (sec_attr_tbl), persisted in the package global g_sec_attr_table.

Its principal purpose is to carry security-relevant context — such as attribute values used by row-level security or attribute-based access checks — through a call stack without requiring each intermediate layer to pass parameters explicitly. The most frequently searched member, GET_ATTR_VALUE, is the read-side accessor for this context.

Key Procedures and Functions

  • INIT — Initializes the package global context collection, clearing or establishing g_sec_attr_table so the session begins with a clean attribute slate. It is typically the first call in any sequence that intends to populate context.
  • SET_ATTR_VALUE — Stores a single attribute name/value pair into the session context. Callers supply an attribute name and its value; the stored record is a sec_attr_record.
  • SET_ATTR_VALUES — Bulk variant that populates multiple attribute name/value pairs in one call. It accepts parallel collections for attribute names and attribute values, reducing round trips when several attributes must be registered together.
  • GET_ATTR_VALUE — The accessor function that returns the VARCHAR2 value associated with a supplied attribute name. Callers invoke it to resolve the value previously registered via SET_ATTR_VALUE or SET_ATTR_VALUES.

Tables Accessed

The ETRM metadata records a single referenced object: PLITBLM, accessed through an APPS synonym. PLITBLM is a standard Oracle EBS support table associated with PL/SQL table (index-by table) handling. The package's context is otherwise held in the package global PL/SQL collection g_sec_attr_table, so persistence is session-level rather than transactional. No other tables are documented as referenced by AS_SEC_CONTEXT.

Usage Notes

AS_SEC_CONTEXT is a low-level utility rather than a user-facing API; it is designed to be invoked from other PL/SQL units, forms, or custom code that needs a shared security context during a session. Typical usage follows an INIT → SET_ATTR_VALUE(S) → GET_ATTR_VALUE pattern: the context is initialized, one or more attributes are registered, and downstream logic resolves them by name.

Because storage is held in package globals, the attribute values persist only for the life of the database session and are not transactional — they are unaffected by COMMIT or ROLLBACK. Callers should therefore initialize the context at the start of processing and treat stored values as session-scoped. The ETRM metadata lists zero dependent packages, indicating AS_SEC_CONTEXT is not referenced by other documented package objects and is intended for direct invocation. Implementations relying on GET_ATTR_VALUE should ensure the requested attribute has been set prior to retrieval.