Search Results count_working_days
Overview
HR_CAL_ABS_DUR_PKG is an Oracle EBS PL/SQL package owned by the APPS schema and classified as an OTHER API within ETRM 12.2.2. Its principal business purpose is to compute the duration of an employee absence, expressed either in days or in hours, based on a supplied start and end date plus optional start and end times. This calculation is central to absence processing in Oracle HRMS, where entitlement, accrual, and payroll elements must be evaluated against an accurately derived duration that respects both the assignment's work schedule and the applicable legislation.
The package declares AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking user rather than the definer, which is consistent with its role as a utility routine invoked from formula contexts and application code. The header carries a source-control revision from 2002, indicating that the interface has remained stable across releases and is carried forward essentially unchanged into 12.1.1 and 12.2.2.
Key Procedures and Functions
- CALCULATE_ABSENCE_DURATION — The primary procedure of the package. It computes an employee's absence duration for a given period. The procedure accepts a flag indicating whether the result should be returned in days or hours, the absence start and end dates, optional start and end times, the business group, the legislation code, a session date, the assignment identifier, and the element type identifier. It returns two output values: the computed duration as a number and an invalid message string, and it also carries an input/output flag controlling whether a formula should be used in the derivation. The invalid message parameter allows the caller to receive diagnostic text when the supplied dates, times, or assignment data cannot produce a valid duration.
- COUNT_WORKING_DAYS — A function that returns a number. Its documented purpose is to count the number of working days from Monday to Friday across the duration of an absence, beginning at a supplied starting date and spanning a supplied total number of days. The package header explicitly notes that this function is called from a formula, which confirms that absence duration logic is designed to be embedded within Oracle Fast Formula execution rather than used exclusively by direct PL/SQL calls.
Tables Accessed
ETRM documents three referenced objects, reached through APPS synonyms:
- FF_FORMULAS_F — The Fast Formula definition table. Its presence confirms that the duration calculation can resolve formula-driven rules, consistent with the
p_use_formulaflag on CALCULATE_ABSENCE_DURATION and with the header comment stating that COUNT_WORKING_DAYS is invoked from a formula. - DUAL — Used for single-row evaluations and simple expression returns within the PL/SQL bodies.
- PLITBLM — The PL/SQL index-by table of VARCHAR2 used for passing and parsing SQL text and numeric lists. Its use implies dynamic or generated SQL statements are constructed and executed as part of the calculation, typically to resolve calendar and working-day information.
Usage Notes
HR_CAL_ABS_DUR_PKG is not intended as an end-user facing interface. It is a supporting utility. The most common invocation path is indirect: an absence-related Fast Formula calls COUNT_WORKING_DAYS (and, through the formula mechanism, CALCULATE_ABSENCE_DURATION) while Oracle HRMS evaluates an absence entry in the Absence Management or absence element processing flow. The procedure may also be called programmatically by other PL/SQL packages; ETRM records that it is referenced by one other package, so custom code should treat it as a shared dependency rather than an isolated routine.
Because the parameter list is positional and lengthy, and because the duration result depends on assignment work schedules, business group, and legislation, callers must ensure that the assignment identifier, element type, and session date are all consistent with the effective dates being supplied. The NOCOPY hints on the output parameters indicate that the procedure mutates its IN OUT arguments in place, so callers must initialize and subsequently inspect the duration, invalid message, and use-formula variables after the call returns. During upgrades between 12.1.1 and 12.2.2, the signature should be verified against the target instance, since the package header documented here dates from an earlier release lineage.
-
PACKAGE: APPS.HR_CAL_ABS_DUR_PKG
12.1.1
-
PACKAGE: APPS.HR_CAL_ABS_DUR_PKG
12.2.2
-
PACKAGE BODY: APPS.HR_CAL_ABS_DUR_PKG
12.1.1
-
PACKAGE BODY: APPS.HR_CAL_ABS_DUR_PKG
12.2.2
-
APPS.HR_CAL_ABS_DUR_PKG dependencies on HR_CAL_ABS_DUR_PKG
12.1.1
-
APPS.HR_CAL_ABS_DUR_PKG dependencies on HR_CAL_ABS_DUR_PKG
12.2.2
-
APPS.HRSTRDBI dependencies on HR_UTILITY
12.1.1
-
APPS.HRSTRDBI dependencies on HRSTRDBI
12.1.1
-
APPS.HRSTRDBI dependencies on HR_UTILITY
12.2.2
-
APPS.HRSTRDBI dependencies on HRSTRDBI
12.2.2
-
PACKAGE BODY: APPS.HRSTRDBI
12.2.2
-
PACKAGE BODY: APPS.HRSTRDBI
12.1.1