Search Results api_updating




Overview

HR_CGD_SHD is a shadow (or "SHD") package body in the APPS schema that supports the Oracle Human Resources grade definition entity. The suffix "_SHD" denotes that this package forms part of the Table Handler infrastructure generated by the Oracle Application Object Library (AOL) for a specific base table, in this case PER_CAGR_GRADES_DEF. The "CGD" segment refers to "CAGR Grade Def," the grade definition table used by Oracle Human Resources to store grade information, including the grade's key flexfield structure (id_flex_num), summary status, enabled status, active dates, and up to twenty flexfield segment values.

The package serves the business function of managing grade definition records within the HR schema, providing the low-level row-level operations that higher-level grade APIs and forms depend upon. It is classified in ETRM as "OTHER" rather than as a public API, which reflects its role as an internal generated handler rather than a supported integration surface.

Key Procedures and Functions

The package body exposes two documented program units:

  • API_UPDATING — A Boolean function that determines whether the current database row for a given grade definition is the same as the row previously loaded into the package's global record (g_old_rec). It accepts the primary key, p_cagr_grade_def_id. When the primary key argument is null, the function returns false. When the supplied key matches the key already held in g_old_rec, the function returns true without re-querying. Otherwise it opens the cursor C_Sel1, fetches the current row for that key into g_old_rec, and returns a Boolean indicating whether the update logic should proceed. This is the standard Oracle Table Handler pattern for optimistic concurrency and change detection.
  • CONVERT_ARGS — A helper routine that converts argument values between the representations used by the Table Handler and the underlying grade definition columns, supporting the mapping of incoming parameters to the standard internal attributes used throughout the handler.

Tables Accessed

The package reads and writes PER_CAGR_GRADES_DEF. The cursor C_Sel1 selects the full row for a given cagr_grade_def_id, including cagr_grade_def_id, id_flex_num, summary_flag, enabled_flag, start_date_active, end_date_active, and segment1 through segment20. The segment columns correspond to the grade definition key flexfield. The fetched row is stored in g_old_rec, the global record that the handler uses as its in-memory image of the current database row, enabling API_UPDATING and the rest of the handler to compare, validate, and eventually persist changes.

Usage Notes

HR_CGD_SHD is not intended to be called directly by end users or by custom integrations. It is invoked indirectly by the Oracle HRMS grade definition forms and by higher-level grade APIs when a grade definition row is queried, inserted, updated, or deleted. The API_UPDATING function is called during update processing to confirm that the row the caller is acting upon is still current and has not been superseded. Because the package is a generated Table Handler, its logic is tightly coupled to the structure of PER_CAGR_GRADES_DEF; any extension of the table (such as additional flexfield segments) requires regenerating the handler. ETRM records that HR_CGD_SHD is referenced by one other package, confirming its role as a subordinate component in the grade definition call chain. Customizations should target the supported HR grade APIs rather than this shadow package, as direct modifications risk being overwritten during patching or regeneration.