Search Results check_unique_grade




Overview

APPS.PER_VALID_GRADES_PKG is a server-side PL/SQL package in Oracle E-Business Suite Human Resources (Oracle HRMS) that manages the validation and retrieval of grade data associated with valid grades. In Oracle HRMS, grades represent compensation and seniority levels that employees hold within a job or business group, and the PER_VALID_GRADES entity defines which grades are valid for a given job over a defined date range. This package encapsulates the business rules governing those grade validity windows, providing both lookup routines and validation routines that enforce date-range consistency and uniqueness constraints.

The package is declared with AUTHID CURRENT_USER, meaning its procedures execute with the privileges of the invoking schema rather than the definer, a common pattern for APPS-owned APIs invoked from forms, concurrent programs, and custom code. The header comment dates the source to 2004 and references Bug 3338072, which introduced the date-from and date-to parameters to the uniqueness check — evidence that date-effective integrity is a central concern of this API.

Key Procedures and Functions

  • GET_GRADE — Returns the grade name (as an OUT parameter) for a supplied grade identifier. It is a simple lookup used to resolve a grade ID into its user-facing description.
  • GET_NEXT_SEQUENCE — Derives the next available sequence number for a valid grade record, supporting the ordering of grade entries within a job's valid-grade set.
  • CHECK_UNIQUE_GRADE — Validates that a grade assignment is unique for a business group and job, considering the grade identifier, the current row, and an effective date range (date-from and date-to). This procedure embodies the Bug 3338072 enhancement that added the date-range parameters to prevent overlapping validity windows.
  • CHECK_DATE_FROM — Validates the start date of a valid-grade record. Given a grade identifier and a date-from value, it confirms the effective start date is permissible relative to existing grade history.
  • CHECK_DATE_TO — Validates the end date of a valid-grade record, accepting the grade identifier, the date-to value, and an end-of-time sentinel to confirm the termination date is consistent and does not conflict with the effective date rules.

Tables Accessed

  • PER_GRADES — The base grade definition table; read to resolve grade identifiers and names.
  • PER_VALID_GRADES — The date-effective intersection of jobs and grades; read to evaluate uniqueness, sequence, and date-range validity.
  • PER_VALID_GRADES_S — The translated (language-specific) view of valid grade data, consulted for descriptive attributes.

Usage Notes

This package is a supporting validation API rather than a full transactional business object. It is typically invoked from the Grade and Valid Grades maintenance forms in Oracle HRMS, from concurrent programs that load or migrate grade setups, and from custom PL/SQL that inserts or updates PER_VALID_GRADES rows directly. Developers calling it should populate the date-from and date-to parameters so that the uniqueness and date checks operate against the correct effective window. Because CHECK_DATE_FROM and CHECK_DATE_TO raise application errors on failure, calling code should handle exceptions appropriately. As the package is documented as referenced by no other packages, it is generally consumed at the form or custom-code layer rather than within the HRMS API dependency chain.