Search Results get_garn_limit_max_duration




Overview

PAY_WAT_UDFS is a declarative PL/SQL package owned by APPS that supplies user-defined functions (UDFs) supporting Oracle Payroll's wage attachment and garnishment processing within Oracle E-Business Suite 12.1.1 and 12.2.2. The package is declared with AUTHID CURRENT_USER, meaning its unqualified references resolve against the privileges of the invoking session rather than the package owner; this is typical of Oracle Payroll business-rule code invoked from fast formulas or payroll run contexts. Its source header (pywatudf.pkh, version 120.0.12000000.1, dated 2007/01/18) indicates the package was shipped with the 12.0 code line and carries forward into later releases without structural change.

The package encapsulates business logic that governs how garnishments and wage attachments are ordered, categorized, and limited during payroll processing. It exposes four documented routines that payroll engine callers, fast formulas, or dependent packages can invoke to derive calculation results, rather than embedding that logic directly in the payroll run.

Key Procedures and Functions

  • ENTRY_SUBPRIORITY — Returns a numeric subpriority value for a payroll element entry, given the date earned and element entry identifier. It supports the ordering of multiple simultaneous wage attachment entries when statutory precedence alone is insufficient.
  • GARN_CAT — Returns a VARCHAR2 garnishment category for a specified element entry and date earned. This classification drives downstream handling such as exempt versus nonexempt treatment and applicable limit rules.
  • FNC_FEE_CALCULATION — Computes a garnishment fee amount. Its parameter list (documented in the package specification) draws on jurisdiction, fee rule, fee amount and percentage, total owed, primary amount balance, additional fee amount, maximum fee amount, accrued fees, and several running balances and deduction amounts. It returns the calculated fee as a NUMBER.
  • GET_GARN_LIMIT_MAX_DURATION — Returns the maximum duration, expressed in days, for which a particular garnishment may be taken in a given state. Per the in-source comment, the duration is derived relative to the garnishment's "Date Served"; where Date Served is null, the minimum effective_start_date of the element entry is used instead. Parameters are documented as element_type_id, original_entry_id, date_earned, and jurisdiction_code contexts. This is the routine most commonly targeted by the search term "get_garn_limit_max_duration".

Tables Accessed

The package resolves the following base tables through APPS synonyms:

Usage Notes

PAY_WAT_UDFS is referenced by one other package and is typically invoked indirectly by Oracle Payroll's wage attachment processing rather than by end users. Its functions are well suited for use inside fast formulas attached to garnishment elements, where a UDF such as GARN_CAT or GET_GARN_LIMIT_MAX_DURATION can be called during the payroll run. Custom code should call the routines with the documented context parameters (element_type_id, original_entry_id, date_earned, jurisdiction_code) and should be aware of the AUTHID CURRENT_USER semantics and the need to supply a correct effective date. Because the package is seeded and proprietary, it should not be modified; extensions belong in a separate custom package.