Results for “hours_between”

6 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

APPS.PAY_CORE_FF_UDFS is a PL/SQL package body that supplies reusable user-defined functions (UDFs) consumed by Oracle EBS international payroll Fast Formulas and localization logic. Its documented purpose is to centralize payroll calculations that would otherwise be duplicated across legislative Fast Formula libraries, including hourly rate derivation, hours worked computation, period-type conversion, and earnings proration. The package was introduced on 01-May-2005 to define user-defined functions used by international payroll, and evolved across releases 115.1 through 115.7 of the source file (paycoreffudfs.pkb) between 2005 and 2008. In both EBS 12.1.1 and 12.2.2 the package is owned by APPS and is classified as OTHER within the ETRM API inventory, with thirteen documented procedures and functions. It is referenced by one other package, confirming its role as a shared utility layer rather than an entry-point API.

Key Procedures and Functions

The package exposes thirteen documented routines. GET_HOURLY_RATE returns the hourly rate based on Salary Basis; later revisions changed it to fall back to the salary as of the termination date when the current salary is null. CALCULATE_ACTUAL_HOURS_WORKED derives hours worked from ATG, work schedule, and standard hours, and was modified to use the CORE HR API for work schedule calculation. STANDARD_HOURS_WORKED returns the standard hours applicable to the assignment. CALCULATE_PERIOD_EARNINGS, added in version 115.3, computes period earnings for the localization teams and handles proration when core proration is not enabled. CONVERT_PERIOD_TYPE likewise supports localization and was changed to use the lookup_code rather than the lookup meaning to avoid translation issues, and to honor the payroll calculation rule defined at the payroll level. TERM_SKIP_RULE_RWAGE supports termination-related skip rule processing for regular wage. HOURS_BETWEEN returns the elapsed hours between two points in time. CALC_REDUCED_REG, CALC_VACATION_PAY, and CALC_SICK_PAY perform reduced regular, vacation, and sick pay computations respectively. GET_UPGRADE_FLAG returns an upgrade indicator, GET_NUM_PERIOD_CURR_YEAR returns the number of periods in the current year, and GET_ASG_STATUS_TYP returns the assignment status type.

Tables Accessed

The package reads and writes payroll and HR data through APPS synonyms. Payroll structure and processing context are drawn from PAY_PAYROLL_ACTIONS, PAY_ACTION_INTERLOCKS, PAY_ASSIGNMENT_ACTIONS, and PAY_LEGISLATION_RULES. Element and input value definitions come from PAY_ELEMENT_TYPES_F, PAY_ELEMENT_TYPE_EXTRA_INFO, PAY_ELEMENT_CLASSIFICATIONS, PAY_INPUT_VALUES_F, PAY_USER_COLUMNS, and the dated entry tables PAY_ELEMENT_ENTRIES_F and PAY_ELEMENT_ENTRY_VALUES_F. Rate information is sourced from PAY_RATES. HR context is obtained from HR_ORGANIZATION_INFORMATION, HR_SOFT_CODING_KEYFLEX, and FND_SESSIONS, the latter supplying session-level context such as effective date and business group.

Usage Notes

PAY_CORE_FF_UDFS is not invoked directly by end users. Its functions are registered as user-defined functions and called from Fast Formula text within payroll element definitions, thereby executing during payroll runs, QuickPay, and prepayments. The localization routines CONVERT_PERIOD_TYPE and CALCULATE_PERIOD_EARNINGS are intended for legislative teams building country-specific formulas. Because the package depends on FND_SESSIONS and HR security context, callers must invoke it within a properly initialized Oracle Applications session, typically through a concurrent payroll process or an HRMS form. Custom code that calls these functions should preserve the same session initialization; direct SQL invocation outside a payroll context may return unexpected results for routines that rely on session or payroll action state.