Search Results get_end_deduction_date




Overview

HR_ADP is a global PL/SQL package owned by the APPS schema that supports Oracle Payroll's ADP (Automatic Data Processing) interfacing functionality. Its primary business purpose is to allow payroll extracts to be run against a user-specified effective date rather than the database system date (SYSDATE). This capability is essential for ADP third-party payroll processing, where extract files must reflect a consistent, controlled point in time for payment, deductions, and eligibility calculations.

The package achieves this by maintaining a set of package-level global variables — including the ADP extract date, ex-employee date and months, and end-deduction date and months — which are populated by a single setter routine and consumed by corresponding getter functions. This design pattern lets any downstream process within the same session read a stable, session-scoped extract date without repeatedly querying a table or hard-coding SYSDATE.

Key Procedures and Functions

  • SET_ADP_EXTRACT_DATE — The sole setter procedure in the package. It accepts the ADP extract date and optional parameters for ex-employee months and end-deduction months, and populates the internal global variables (g_adp_extract_date, g_ex_employee_date, g_ex_employee_months, g_end_deduction_date, g_end_deduction_months) used throughout the extract process.
  • GET_ADP_EXTRACT_DATE — Returns the currently set ADP extract date. It is declared with the PRAGMA RESTRICT_REFERENCES directive (WNDS), indicating it performs no writes to database state and can be safely called from SQL contexts.
  • GET_EX_EMPLOYEE_DATE — Returns the ex-employee date derived from the extract date and the ex-employee months setting. Also carries a WNDS purity pragma.
  • GET_END_DEDUCTION_DATE — Returns the end-deduction date derived from the extract date and end-deduction months setting. Also carries a WNDS purity pragma.
  • GET_MAX_PPM_PRIORITY — Given an assignment identifier, returns the maximum priority among that assignment's personal payment methods, used to determine the primary payment method during extract processing.

Tables Accessed

The package references PAY_PERSONAL_PAYMENT_METHODS_F (via an APPS synonym). This table stores an employee's personal payment method records — bank account, payment type, and priority — and is queried by GET_MAX_PPM_PRIORITY to identify the highest-priority (primary) payment method for a given assignment. Because the package was created in 2005 (per the $Header line peadppkg.pkh 120.2), it is a long-standing component of the payroll extract infrastructure.

Usage Notes

HR_ADP is typically invoked at the start of an ADP extract run so that every subsequent calculation in the session uses a consistent effective date. The setter is called once to establish the extract context, and the getter functions are called repeatedly by other payroll packages, extract routines, or concurrent programs that assemble the ADP output files.

The package is referenced by 21 other packages according to ETRM metadata, confirming its role as a shared utility rather than an end-user-facing program. It is not associated with a form or a directly runnable concurrent program; instead, it is consumed by custom or Oracle-delivered payroll code that performs third-party (ADP) disbursement processing. Customers extending payroll extracts should call SET_ADP_EXTRACT_DATE before invoking dependent logic, and read dates exclusively through the getter functions to avoid bypassing the configured extract context.