Search Results hk_scheme_val
Overview
PAY_HK_MPF is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that encapsulates the calculation logic for Hong Kong Mandatory Provident Fund (MPF) processing. The MPF is the statutory pension scheme applicable to Hong Kong payroll, and this package provides the reusable business rules that determine contribution eligibility, contribution periods, retroactive adjustments, and termination treatment for employees enrolled in an MPF scheme. Because MPF eligibility depends on statutory criteria — including the minimum relevant income threshold, the minimum age of eighteen, employment dates, and the designation of the relevant employment period — the package centralizes these determinations so that they are consistently applied across the Hong Kong payroll processes rather than being reimplemented in each calling program. The header comment referencing pyhkudfs.pkh indicates this is a payroll user-defined function library for Hong Kong localization. The package is classified as OTHER in the ETRM metadata, meaning it is a custom localization utility rather than a public API supporting a documented business object interface.
Key Procedures and Functions
The package exposes four documented program units.
- GET_RETRO_MPF — a function that computes a retroactive MPF contribution amount. It evaluates MPF liability across a defined date range using the assignment, business group, pay basis, contribution percentage, calculation method, hire date, minimum birthday, employer liability start date, employee deduction start date, and contributions end date supplied by the caller. It returns a numeric value representing the retro contribution.
- HK_SCHEME_VAL — the function the user searched for. It is a validation routine that accepts a business group identifier, an assignment identifier, and a candidate entry value, and returns a VARCHAR2 result. It is used to validate an MPF scheme entry against the employee's assignment context, confirming that the submitted scheme value is legitimate for that individual.
- HK_QUARTERS_VAL — parallel to the scheme validation, this function validates a quarters-related entry value against the assignment and business group, returning the validated VARCHAR2 result.
- GET_ACT_TERMINATION_DATE — added to address Bug 3333006, this function derives the actual termination date for an assignment as at a specified reference date. It accepts the assignment identifier and a date, and returns the effective termination date.
No parameter lists are invented here; only the documented signatures above are referenced.
Tables Accessed
The package references the following tables through APPS synonyms:
- PER_ALL_ASSIGNMENTS_F — the core assignment record supplying employment dates, assignment identity, and the basis for termination and eligibility checks.
- HR_ALL_ORGANIZATION_UNITS and HR_ORGANIZATION_INFORMATION — organization definitions and their descriptive attributes, used to resolve the business group and any scheme-related organizational classification.
- PER_ASSIGNMENT_EXTRA_INFO — flexfield-based assignment-level descriptive information, typically where MPF scheme and enrollment attributes are held.
- PER_PERIODS_OF_SERVICE — periods of service records, used to determine statutory employment dates and the applicable termination date.
- PER_TIME_PERIODS — payroll time period definitions, used to align contributions and retro calculations to the correct payroll periods.
These reads support eligibility determination, scheme validation, and the period arithmetic required by GET_RETRO_MPF and GET_ACT_TERMINATION_DATE.
Usage Notes
PAY_HK_MPF is an internal localization library rather than a public API. It is most commonly invoked from Hong Kong payroll fast formulas, element calculation rules, and validation logic that runs during payroll processing and pre-payment validation. The hk_scheme_val function in particular is typically called to validate the MPF scheme entered on an assignment before payroll accepts it, returning the validated scheme reference. The ETRM metadata records zero packages referencing this one, indicating it is a leaf dependency consumed by forms, fast formulas, and concurrent processes rather than by other PL/SQL packages. Custom extensions requiring Hong Kong MPF calculations should call these functions rather than reimplementing the logic.