Search Results terminate_employee




Overview

The APPS.HR_EX_EMPLOYEE_INTERNAL package is a PL/SQL API belonging to the Oracle E-Business Suite Human Resources (HR) module, classified under the "OTHER" API category in the ETRM 12.2.2 documentation. Its primary business function is to provide a programmatic interface for processing employee terminations within the Oracle HRMS data model. The package encapsulates the logic required to terminate an employee's period of service, update assignment statuses, and record the associated termination details such as leaving reason, dates, and comments. By centralising this logic, the API ensures that all the intricate business rules governing termination — validation of effective dates, synchronisation of assignment and period-of-service records, and derivation of final process dates — are enforced consistently, regardless of whether the termination originates from a form, a concurrent program, or custom code.

Key Procedures and Functions

The ETRM metadata documents three procedures/functions within this package, though the source excerpt exposes two explicitly:

  • TERMINATE_EMPLOYEE — The core procedure responsible for performing an employee termination. As evidenced by the source header, the API is overloaded, meaning multiple versions exist with different parameter signatures. The documentation explicitly states that the legacy version shown in the source is now out-of-date and is retained solely for backward compatibility; Oracle recommends that existing calling programs be modified in advance to avoid disruption when support is eventually withdrawn. The procedure accepts parameters controlling validation mode (p_validate), effective date, the period of service identifier, an in/out object version number for optimistic locking, and a range of optional attributes including person type, assignment status type, termination acceptance details, actual/accepted/notified/projected termination dates, leaving reason, comments, and descriptive flexfield attributes (attribute category and attribute1 through attribute4). It also returns final and last standard process dates as out parameters.
  • REVERSE_TERMINATE_EMPLOYEE — The counterpart procedure that reverses a previously executed termination, restoring the employee's assignment and period-of-service records to their pre-termination state. This supports the common business need to undo terminations that were entered in error or subsequently rescinded.
  • A third documented procedure/function is recorded in the metadata but is not named in the supplied excerpt.

Tables Accessed

The package operates against several core HRMS tables via APPS synonyms:

  • PER_PERIODS_OF_SERVICE — The central table storing an employee's periods of service; the termination is written here, including the actual termination date and leaving reason.
  • PER_ALL_ASSIGNMENTS_F — The dated assignments table that is updated to reflect the effective end of the assignment and alignment of the termination date.
  • PER_ASSIGNMENT_STATUS_TYPES — Used to resolve and validate the assignment status type applied upon termination (for example, a terminated or inactive status).
  • PER_ROLES and PER_SHARED_TYPES — Supporting setup tables referenced for validation and lookup resolution during processing.

Usage Notes

HR_EX_EMPLOYEE_INTERNAL is typically invoked when a termination must be applied programmatically rather than through the standard "Terminate Employment" form. Common callers include custom PL/SQL routines, concurrent programs performing bulk terminations, and integration interfaces that receive termination data from external HR or payroll systems. Because the API is overloaded and the legacy signature is deprecated, developers should call the current supported overload and migrate any code referencing the outdated version well before Oracle withdraws backward-compatibility support. The ETRM metadata notes that this package is referenced by two other packages, confirming its role as a reusable internal service layer. When calling the API, the p_validate flag allows a dry-run to verify that a termination would succeed without committing changes — a recommended practice before executing terminations in bulk. The p_object_version_number parameter supports optimistic locking, ensuring that concurrent modifications to the employee record do not result in lost updates.