Search Results get_g_session_var
Overview
GHR_HISTORY_API is an Oracle E-Business Suite PL/SQL package owned by the APPS schema and classified as an API in the ETRM repository. Its business purpose is to capture, persist, and retrieve audit history for changes made to core Oracle HRMS entities through the Oracle Forms-based user interface. The package forms the backbone of the "Person Management" and related HR forms history tracking mechanism, recording the nature of every insert, update, or delete performed against people, assignments, addresses, extra information records, element entries, and positions. Each recorded event is written to the GHR_PA_HISTORY table and linked to a history request maintained in GHR_PA_REQUESTS, allowing the application to display a chronological, user-readable audit trail of HR changes.
The header constants declared in the package explicitly enumerate the subject tables whose DML is being tracked, including PER_PEOPLE_F, PER_ASSIGNMENTS_F, PER_PEOPLE_EXTRA_INFO, PER_ASSIGNMENT_EXTRA_INFO, PAY_ELEMENT_ENTRIES_F, PAY_ELEMENT_ENTRY_VALUES_F, PER_POSITION_EXTRA_INFO, PER_ADDRESSES, PER_PERSON_ANALYSES, and HR_ALL_POSITIONS_F. The package therefore serves as the common history-recording layer across multiple HRMS forms rather than a single module.
Key Procedures and Functions
The package exposes fifteen documented procedures and functions. Session-scoped state is managed by SET_G_SESSION_VAR, GET_G_SESSION_VAR, REINIT_G_SESSION_VAR, and DISPLAY_G_SESSION_VAR, which respectively populate, return, reset, and display the PL/SQL session variables (notably the current PA request identifier, nature-of-action identifier, and person identifier). GET_SESSION_DATE supplies the reference date used to timestamp history activity.
- SET_OPERATION_INFO — stores details about a DML operation that should be tracked.
- ROW_ALREADY_TOUCHED — determines whether a row has already been recorded in the current history request, preventing duplicate capture.
- ADD_ROW_OPERATION_INFO_RG — populates the internal operation-info collection during row-level processing.
- ADD_ROW_PRE_UPDATE_RECORD_RG — captures the pre-change image of a row before the update proceeds.
- POST_UPDATE_PROCESS — executes the post-update logic that commits history entries once the underlying DML completes.
- FETCH_HISTORY_INFO — retrieves previously stored history records for display or further processing.
- POST_FORMS_COMMIT_PROCESS — invoked after a Forms commit to flush accumulated history information to GHR_PA_HISTORY.
- NEW_FORM_INSTANCE_PROCESS — initialises the history-tracking state whenever a new Oracle Forms instance is opened.
Tables Accessed
The primary write target is GHR_PA_HISTORY, which stores one row per tracked change. GHR_PA_REQUESTS holds the parent history request, including the CANCEL and CORRECT action values that the package constants g_cancel and g_correct reference. FND_SESSIONS supplies session context. GHR_NATURE_OF_ACTIONS provides the descriptive nature-of-action values attached to each history record. The remaining referenced tables — PER_ALL_PEOPLE_F, PER_ALL_ASSIGNMENTS_F, PER_PEOPLE_EXTRA_INFO, PER_ASSIGNMENT_EXTRA_INFO, PER_ADDRESSES, PER_PERSON_ANALYSES, PER_POSITION_EXTRA_INFO, HR_ALL_POSITIONS_F, PAY_ELEMENT_ENTRIES_F, and PAY_ELEMENT_ENTRY_VALUES_F — are the transactional subjects whose changes are being audited. DUAL is used for simple value selection.
Usage Notes
GHR_HISTORY_API is designed to be called from Oracle Forms triggers (typically KEY-COMMIT, POST-FORMS-COMMIT, WHEN-NEW-FORM-INSTANCE, and block-level row handlers) rather than from concurrent programs. The ETRM metadata records that it is referenced by 59 other packages, confirming its role as a widely reused foundation API across HRMS modules. Customisations that must appear in the standard HR history display should invoke this package rather than inserting directly into GHR_PA_HISTORY, preserving the request and nature-of-action relationships expected by the forms.
-
PACKAGE: APPS.GHR_HISTORY_API
12.1.1
-
PACKAGE: APPS.GHR_HISTORY_API
12.2.2
-
PACKAGE BODY: APPS.GHR_HISTORY_API
12.2.2
-
PACKAGE BODY: APPS.GHR_HISTORY_API
12.1.1
-
APPS.GHR_HISTORY_API dependencies on HR_UTILITY
12.2.2
-
APPS.GHR_HISTORY_API dependencies on HR_UTILITY
12.1.1
-
APPS.GHR_HISTORY_API dependencies on GHR_HISTORY_API
12.2.2