Search Results check_unique_row




Overview

APPS.PER_ABV_PKG is a PL/SQL package in Oracle E-Business Suite that encapsulates business logic for the PER_ASSIGNMENT_BUDGET_VALUES entity, which stores assignment-level budget values used by Oracle Human Resources and related budgeting functionality. The package body (source file peabv01t.pkb, version 115.2) is classified as OTHER in the ETRM metadata and resides in the APPS schema. Its principal responsibilities are enforcing uniqueness constraints on assignment budget value rows, generating surrogate primary keys from the PER_ASSIGNMENT_BUDGET_VALUES_S sequence, performing pre-commit validation, populating derived column values, detecting duplicate effective-dated records, and resolving the maximum end date of a parent assignment so that child records can be dated consistently. The package forms the programmatic backbone behind the Assignment Budget Values form and any concurrent or custom process that inserts or updates budget value rows for an assignment.

Key Procedures and Functions

The documented package exposes four procedures/functions, plus internal helpers referenced in the source excerpt.

  • CHECK_UNIQUE_ROW — Validates that no other row exists in PER_ASSIGNMENT_BUDGET_VALUES for the same assignment_id and unit combination. The internal cursor treats a null rowid as a new insert and excludes the current row when a rowid is supplied, so it can be reused for both insert and update validation. On finding a match it raises the seeded HR message HR_6433_EMP_ASS_BUDGET via HR_UTILITY.
  • CHECK_FOR_DUPLICATE_RECORD — Introduced in version 110.1 to detect effective-dated overlaps. If the effective dates of the current record fall within those of an existing record, the routine signals an error, preventing duplicate dated budget records for the same assignment.
  • GET_PARENT_MAX_END_DATE — Returns the maximum end date for a given assignment id. This value is used to cap the end date of child records, preserving date-track integrity between the parent assignment and its budget values.
  • PRE_COMMIT_CHECKS — Aggregates the validation logic executed before a row is committed, ensuring uniqueness and date consistency prior to DML.
  • POPULATE_FIELDS — Assigns derived or defaulted values to record attributes prior to insert or update.
  • GET_UNIQUE_ID — Internal function that fetches the next value from PER_ASSIGNMENT_BUDGET_VALUES_S via SYS.DUAL, supplying surrogate keys to the caller.

Tables Accessed

  • PER_ASSIGNMENT_BUDGET_VALUES_F / _S — The base table and its sequence. The package reads rows to detect duplicates, obtains new keys from the sequence, and writes budget value records.
  • PER_ALL_ASSIGNMENTS_F — Referenced to validate the parent assignment and to compute the maximum end date used in date-tracking checks.

Usage Notes

PER_ABV_PKG is invoked primarily from the Assignment Budget Values form and from any concurrent or custom PL/SQL that maintains assignment budget data. Developers customizing budget value maintenance should call POPULATE_FIELDS, PRE_COMMIT_CHECKS, GET_UNIQUE_ID, and CHECK_FOR_DUPLICATE_RECORD in the standard order rather than issuing direct DML, so that uniqueness and date-track rules are enforced uniformly. Because the package raises seeded HR error messages through HR_UTILITY, callers must include standard HR error handling. In 12.1.1 and 12.2.2 the object remains in the APPS schema with no public synonym requirement beyond APPS execution privileges. The package is referenced by one other package (per ETRM metadata), confirming it is a low-level utility rather than an entry-point API.