Search Results g_debug




Overview

APPS.PER_IN_ADD_LEG_HOOK is an Oracle E-Business Suite 12.1.1 / 12.2.2 database package that implements a legislative (localization) hook for the Oracle Human Resources (PER) address validation framework as applied to the India (IN) localization. Its documented package body reveals a header revision (peinlhad.pkb 120.3.12010000.2) dated 2008, indicating that the object has been a stable component of the HR application modules across the 11i to 12.x upgrade cycle and remains present in 12.1.1 and 12.2.2.

The business purpose of this package is to enforce India-specific address rules during entry and maintenance of person and location addresses. In the India localization, postal addresses require validation against the PIN (Postal Index Number) code system. The package realizes this by combining a driver procedure, CHECK_ADDRESS, with a private validation function, validate_pin_code, and a cursor over the IN_PIN_CODES lookup type in HR_LOOKUPS. Together these elements validate state, address information, and PIN code fields before the address record is committed.

The package depends on shared HR and payroll localization utilities, notably pay_in_utils.trace and hr_utility.debug_enabled, and therefore participates in the standard EBS diagnostic and tracing infrastructure. The "ADD_LEG" naming convention signals that the package is invoked as a legislative hook at the point that an address is added to the database, permitting country-specific logic to be executed without affecting the core HR address model.

Key Procedures and Functions

The documented package exposes four procedures, representing insert and update variants for person addresses and location addresses respectively:

  • CHECK_PER_ADDRESS_INS — Validation hook executed when a new person address (PER_ADDRESSES record) is inserted. It applies the India localization PIN code and address validation rules prior to commit.
  • CHECK_LOC_ADDRESS_INS — Validation hook executed when a new location address (HR_LOCATIONS_ALL record) is inserted. It ensures localized address consistency for the location entity.
  • CHECK_PER_ADDRESS_UPD — Validation hook executed when an existing person address is updated, re-running the India localization checks against the modified state and postal code values.
  • CHECK_LOC_ADDRESS_UPD — Validation hook executed when an existing location address is updated.

Internally, the package body defines CHECK_ADDRESS as the private driver procedure that receives the address style, an address information attribute used to carry state, and the postal code. validate_pin_code is a private function performing the principal PIN code validation against state values. These private routines are not part of the documented external interface but underpin the four public hooks.

Tables Accessed

The package reads from the following documented tables (accessed through APPS synonyms):

  • HR_LOCATIONS_ALL — the base location address table; consulted for location address validation during CHECK_LOC_ADDRESS_INS and CHECK_LOC_ADDRESS_UPD.
  • PER_ADDRESSES — the person address table; consulted for person address validation during CHECK_PER_ADDRESS_INS and CHECK_PER_ADDRESS_UPD.
  • DUAL — standard Oracle single-row dummy table, typically used for controlled PL/SQL evaluations within the validation logic.
  • PLITBLM — the PL/SQL integer table (index-by table) type construct referenced within the package.

Usage Notes

This package is not intended for direct invocation by end users. It is a legislative hook automatically called by the Oracle HR address maintenance framework whenever person or location addresses are inserted or updated, ensuring that India PIN code rules are enforced at the database tier. Because it is referenced by four other packages, changes must be regression tested against all dependent HR address flows in both releases.

Deployments should be assessed during 12.1.1 to 12.2.2 upgrades, since the OAF-based address pages in 12.2 continue to route through the same legislative hook mechanism. Custom address-handling code that bypasses the standard HR address APIs will not trigger this validation and should be reviewed for compliance with PIN code requirements.