Search Results chk_termination_reason




Overview

APPS.PER_APL_BUS is a server-side PL/SQL package in Oracle E-Business Suite 12.1.1 and 12.2.2 that implements the business-rule validation layer for the PER_APPLICATIONS entity within Oracle Human Resources (PER). The suffix "BUS" identifies it as a business-rules package, distinct from the table handler (_TH) and row handler (_RHI) layers generated by the Oracle Application Object Library (AOL) table handler framework. Its header comment identifies the source file as peaplrhi.pkh, confirming that PER_APL_BUS is generated as part of the row handler infrastructure for the PER_APPLICATIONS table and is therefore classified under ETRM as an OTHER API intended for internal table-handler use only.

The package encapsulates the declarative and programmatic validations that must succeed before an Application row may be inserted, updated, or deleted. It exists so that validation logic is centralized and reusable across the DML path rather than embedded in individual forms or concurrent programs.

Key Procedures and Functions

The documented package exposes eight procedures and functions. The user-searched routine, chk_termination_reason, validates the application termination reason supplied on an Application record; it raises an error when the termination reason does not exist in the HR_LOOKUPS table. The related validators are:

  • chk_termination_reason — verifies that the supplied termination reason is a valid lookup value.
  • chk_date_received_person_id — validates the combination of person identifier and date received attributes on the Application.
  • chk_projected_hire_date — validates the projected hire date attribute.
  • chk_date_end — validates the end-date attribute for the Application record.
  • insert_validate — orchestrates all validations executed prior to an INSERT of a PER_APPLICATIONS row.
  • update_validate — orchestrates the validations executed prior to an UPDATE.
  • delete_validate — orchestrates the validations executed prior to a DELETE.
  • return_legislation_code — returns the legislation (country) code associated with the Application, used to drive legislation-specific validation behavior.

Each validation raises a named error on failure so the caller can surface a user-readable message; when no business-rule violations are detected, processing continues uninterrupted.

Tables Accessed

The package operates against three documented tables accessed through APPS synonyms:

  • PER_APPLICATIONS — the primary entity table. Validators read and validate its termination reason, date received, projected hire date, end date, person identifier, and legislation attributes; the validate routines govern INSERT, UPDATE, and DELETE against this table.
  • PER_ALL_PEOPLE_F — the person datetrack record, consulted to confirm the validity of person_id and the date-received/person relationship.
  • PER_PERSON_TYPES — consulted to confirm the person type context associated with the Application.

Validation of the termination reason additionally performs a lookup against the HR_LOOKUPS table, as stated in the package comments.

Usage Notes

PER_APL_BUS is documented with an Access Status of "Internal Table Handler Use Only." It should not be invoked directly from custom code; instead, customers and integrators should call the supported Application APIs, which in turn rely on this package. The package is referenced by three other packages, consistent with its role as a shared validation dependency for higher-level API and row-handler logic.

Typical invocation paths include the Application entry and maintenance forms in Oracle HRMS, which call the underlying API and ultimately trigger insert_validate, update_validate, and delete_validate, and concurrent or batch processes that create or amend Applications. In custom development, the correct practice is to call the public API rather than the business-rules package, preserving validation integrity and forward compatibility across 12.1.1 and 12.2.2.