Search Results hr_template_item_contexts_b_s




Overview

APPS.HR_TEMPLATE_ITEM_CONTEXTS_PKG is a PL/SQL package body in the Oracle E-Business Suite Human Resources (HR) schema. It encapsulates the server-side logic that maintains the HR_TEMPLATE_ITEM_CONTEXTS_B entity, which stores the context (key flexfield structure and segment) information associated with individual items within a form or template definition. This table is the context-level child of HR_TEMPLATE_ITEMS_B and is part of the broader "template item" configuration model used by Oracle HRMS to drive which descriptive or key flexfield contexts are exposed for a given template item.

The package functions as the programmatic access layer for that table, providing the standard DML wrapper routines (insert, update, delete, lock) that other HRMS configuration components and forms call instead of issuing direct SQL against the base table. Because it touches the "_B" (base) table and its "_B_S" sequence, it participates in the standard Oracle EBS base/translation pattern: the _B table holds the language-independent row, and the sequence _B_S supplies the surrogate primary key used during row creation.

Key Procedures and Functions

The documented interface exposes six procedures/functions, each serving a well-defined role in the row lifecycle:

  • INSERT_ROW — Creates a new template item context record in HR_TEMPLATE_ITEM_CONTEXTS_B, assigning the primary key from the HR_TEMPLATE_ITEM_CONTEXTS_B_S sequence and populating the WHO columns (creation date, created by, etc.) as part of the insert.
  • UPDATE_ROW — Modifies an existing template item context row, applying the caller-supplied changes and stamping the update WHO columns.
  • DELETE_ROW — Removes a template item context row from the base table, performing any associated validation or referential handling before the physical delete.
  • LOCK_ROW — Issues a SELECT ... FOR UPDATE against the target row to obtain a row-level lock, ensuring concurrency safety before an update or delete is performed within the same transaction.
  • OWNER_TO_WHO — A utility routine that derives and populates the standard WHO audit columns (created_by, creation_date, last_updated_by, last_update_date, last_update_login) from the session context, ensuring consistent auditing across all DML operations in the package.
  • LOAD_ROW — A row-loading routine used to fetch and materialize a template item context record into the package's PL/SQL structures, typically for use during translation or batch-loading scenarios.

The presence of both LOCK_ROW and OWNER_TO_WHO confirms that the package follows Oracle HRMS's standard API conventions for concurrency control and audit stamping.

Tables Accessed

Through APPS synonyms, the package reads and writes the principal table HR_TEMPLATE_ITEM_CONTEXTS_B and obtains surrogate keys from the HR_TEMPLATE_ITEM_CONTEXTS_B_S sequence. It also references HR_TEMPLATE_ITEMS_B (the parent item), HR_ITEM_CONTEXTS (the context definitions), HR_FORM_ITEMS_B and HR_FORM_TEMPLATES_B (the form/template hierarchy that ultimately consumes the item), and HR_TEMPLATE_ITEM_CONTEXTS_PKG itself (recursive or cross-call reference). Resolution and validation logic relies on FND_APPLICATION, FND_FORM, and FND_ID_FLEX_STRUCTURES to resolve flexfield structures and registered forms. FND_MESSAGE and APP_EXCEPTION supply standardized error and message handling, HR_API provides shared HRMS API utilities, and PER_RIC_PKG supports row-information/context processing. DUAL is used for single-row computations.

Usage Notes

The package is invoked indirectly rather than by end users. Typical callers are the HRMS configuration forms that maintain template items and their contexts, and internal HRMS batch or upgrade routines that load template definitions. Because it is not referenced by any other database object and is classified as OTHER (not a public HR_API), it should be treated as an internal implementation package: custom code should prefer supported HRMS public APIs and avoid direct invocation unless the calling code fully replicates the WHO stamping, sequence handling, and locking conventions enforced here. When extending or debugging template item context behavior in EBS 12.1.1 or 12.2.2, this package is the first place to inspect for the authoritative row-maintenance logic.