Search Results ghr_session




Overview

GHR_SESSION is a low-level Oracle E-Business Suite PL/SQL package owned by the APPS schema that is responsible for establishing and maintaining the session context used by the Oracle Human Resources (GHR) product family. Its central purpose is to ensure that the FND session infrastructure correctly reflects the effective date and identity of the current database session before HR-related logic executes. Because HR processes are date-effective by design, many downstream APIs and views depend on a properly initialized session record in FND_SESSIONS; GHR_SESSION provides the mechanism that seeds and synchronizes that record. The package is declared with AUTHID CURRENT_USER, meaning its procedures execute with the privileges of the invoking user rather than the definer, which allows it to be called safely from a variety of application contexts. ETRM classifies it as an OTHER API and confirms a deliberately narrow public surface of two documented procedures.

Key Procedures and Functions

  • SET_SESSION_VAR_FOR_CORE — The primary documented entry point. Its role is to make sure that there is an entry in the FND_SESSIONS table for the current session, using the supplied effective date to anchor that session context. In the shipped header this procedure is declared with a single effective-date parameter, reflecting the HR requirement that all subsequent date-effective operations have a consistent "as of" point.
  • SET_FND_SESSION_DATE — The second documented procedure, which manages the session date held in the FND session framework. It aligns the recorded session date with the value required by GHR processing so that date-tracked queries and validations resolve against the intended effective date.

Both procedures are callable from the APPS schema and are intended to be invoked before HR business logic, not during it.

Tables Accessed

  • FND_SESSIONS — The Oracle Application Object Library table that stores session-level information keyed by session identifier. GHR_SESSION inserts or updates rows here so that the current session is registered and its effective date is persisted for the duration of the connection. This is the package's only substantive data access.
  • DUAL — Referenced for trivial singleton queries and expression evaluation used in the session setup logic.

No HR transactional tables are read or written directly; the package is purely a session-context utility.

Usage Notes

GHR_SESSION is an infrastructure dependency rather than an end-user API. ETRM records that it is referenced by 18 other packages, indicating that it is invoked indirectly whenever a higher-level HR routine requires the session to be initialized or the session date to be reset—typically at the start of a request or a form-based workflow. In Oracle Forms, it is commonly called during form initialization or before invoking date-effective HR logic so that FND_SESSIONS reflects the correct effective date. From concurrent programs and custom code, the recommended pattern is to call the appropriate procedure once at the beginning of the unit of work, then proceed with the normal HR APIs; repeated invocation within the same session is generally unnecessary. Because the package uses AUTHID CURRENT_USER and touches FND_SESSIONS, callers should ensure that the invoking user has the necessary privileges and that the session is not later re-pointed to a different effective date without re-invoking the setup logic. The package is versioned in the shipped header as ghstsess.pkh and should be treated as a stable, non-customizable Oracle-delivered component.