Search Results get_person_details




Overview

PER_PER_AGGR is a PL/SQL package body owned by the APPS schema in Oracle E-Business Suite, classified as an "OTHER" API within the Human Resources (PER) module. Its business purpose is to enforce and maintain the PAYE (Pay As You Earn) and National Insurance (NI) aggregation flags on person records for United Kingdom payroll legislation. These flags, stored on the PER_ALL_PEOPLE_F record, determine whether an employee's tax and NI contributions are aggregated across multiple assignments for PAYE and NI reporting purposes.

The package is registered in ETRM at the 12.1.1 and 12.2.2 release levels and is referenced by two other packages, indicating it forms part of a dependency chain invoked during person-record maintenance. The package body carries the header identifier pegbperhi.pkb and a change stamp referencing bug#8370225, confirming its introduction as a targeted legislative enhancement for GB payroll processing rather than a general-purpose HR utility.

Key Procedures and Functions

Two procedures are documented for this package:

  • AI_CHECK_PAYE_NI_FLAGS — The "AI" prefix denotes an After Insert database trigger event. This procedure evaluates the PAYE and NI aggregation flags on a newly inserted person record. It reads the profile option GB_PAYE_NI_AGGREGATION; when the profile is set to 'Y', it queries the person via an internal cursor named GET_PERSON_DETAILS against PER_ALL_PEOPLE_F. If both aggregation flags are null or 'N' and the current employee flag is 'Y', the procedure sets both aggregation assignments to 'Y' and calls HR_PERSON_API.update_gb_person in CORRECTION datetrack update mode to persist the change.
  • AU_CHECK_PAYE_NI_FLAGS — The "AU" prefix denotes an After Update trigger event. This procedure performs the equivalent validation and flag-maintenance logic when a person record is updated, ensuring that PAYE and NI aggregation settings remain consistent after modifications to the underlying person data.

The internal cursor GET_PERSON_DETAILS, which corresponds to the user's search term, is not a public API entry point but a private query construct within AI_CHECK_PAYE_NI_FLAGS. It selects person_id, object_version_number, employee_number, PER_INFORMATION9, PER_INFORMATION10, and CURRENT_EMPLOYEE_FLAG from PER_ALL_PEOPLE_F, filtered by person_id and the effective date range.

Tables Accessed

The package operates against a single documented table, PER_ALL_PEOPLE_F, the core datetracked HR table holding person records. It is read through the GET_PERSON_DETAILS cursor to retrieve the employee number, the aggregation flag columns (mapped to PER_INFORMATION9 and PER_INFORMATION10), the current employee flag, and the object version number required for optimistic locking during the subsequent API update. Writes to PER_ALL_PEOPLE_F are not performed directly; instead, the package delegates persistence to HR_PERSON_API.update_gb_person, which applies the datetracked correction. No other application tables are referenced by the documented package metadata.

Usage Notes

PER_PER_AGGR is an internal trigger-support package rather than a form-invoked or concurrent-program API. It is called automatically by the database triggers defined on PER_ALL_PEOPLE_F for the after-insert and after-update events, ensuring that GB PAYE/NI aggregation flags are maintained whenever person records are created or changed through any channel, including the People form, the HR Person API, or bulk data loads.

Because the logic is gated on the GB_PAYE_NI_AGGREGATION profile option, the package has no functional effect unless that profile is enabled for the user or site. Custom code should not call AI_CHECK_PAYE_NI_FLAGS or AU_CHECK_PAYE_NI_FLAGS directly, as doing so bypasses trigger ordering and may conflict with the datetracked updates applied through HR_PERSON_API. The two dependent packages that reference PER_PER_AGGR should be reviewed when assessing the impact of any modification, since changes here propagate through the GB payroll person-maintenance path.