Search Results validate_reverse_termination
Overview
APPS.PER_GB_REVERSE_TERM_RULES is a United Kingdom localization package body within Oracle Human Resources (Oracle E-Business Suite 12.1.1 / 12.2.2) that governs the business rules applied when a previously processed termination is reversed. Reversing a termination is a sensitive operation: once a P45 has been issued to an employee, legislative and payroll obligations mean the termination cannot simply be undone without appropriate handling. This package encapsulates the validation logic required to detect such conflicts before the reversal proceeds, safeguarding statutory Year End and P45 reporting integrity.
The package is classified as an "OTHER" API in the ETRM metadata, indicating it is a supporting internal validation routine rather than a public, formally versioned business API. It is documented with a single procedure, VALIDATE_REVERSE_TERMINATION, and is referenced by one other package, confirming its role as a shared utility invoked by higher-level termination or HR reversal processes.
Key Procedures and Functions
- VALIDATE_REVERSE_TERMINATION — The sole documented procedure. It accepts a person identifier and an actual termination date, and validates whether reverting that termination is permissible. It drives a cursor over all assignments for the person whose effective date range spans the given actual termination date and whose assignment status is either ACTIVE_ASSIGN or SUSP_ASSIGN. For each qualifying assignment, it calls pay_p45_pkg.return_p45_issued_flag to determine whether a P45 has already been issued. If the flag returns 'Y', the procedure raises an error using message HR_GB_78150_P45_ISSUED_SS ("P45 issued"), aborting the reversal. If no assignment has an issued P45, the procedure completes silently, allowing the reversal to continue.
Tables Accessed
- PER_ALL_ASSIGNMENTS_F — Read to retrieve the assignment_id and assignment_number for every assignment belonging to the person that was effective on the termination date. This determines which assignments must be checked for a previously issued P45.
- PER_ASSIGNMENT_STATUS_TYPES — Read to resolve the assignment_status_type_id and restrict the cursor to system statuses ACTIVE_ASSIGN and SUSP_ASSIGN, ensuring only currently live assignments are evaluated.
- PAY_P45_PKG — Invoked (not a base table) via return_p45_issued_flag to determine P45 issuance state for each assignment.
Usage Notes
The procedure is guarded by hr_utility.chk_product_install('Oracle Human Resources', 'GB'), so it executes only when the UK HR localization is installed; otherwise it returns without action. It uses hr_utility.trace and set_location for diagnostic logging, and hr_utility.set_message/raise_error to surface the validation failure to the calling form or process.
Typical invocation occurs through the UK termination reversal UI in the People/Assignment forms and from related HR processes that reverse terminations, rather than from concurrent programs or custom code directly. Because the error is raised via hr_utility.raise_error, callers should expect an Oracle Forms-level error rather than a returned status flag. Customizations that reverse terminations should call this package first to avoid bypassing the P45 safeguard. The source header (pegbrtmr.pkb 120.1) indicates a UK-specific, non-shipped (noship) object subject to localization maintenance.