Search Results convert_period_type




Overview

PAY_CORE_FF_UDFS is an Oracle Payroll core package that supplies user-defined functions (UDFs) consumed by the FastFormula engine during payroll processing. Its declared purpose, per the change history in the package header, is to "define user defined function used by international payroll." The package is owned by APPS and is classified as an OTHER API within ETRM. It is declared AUTHID CURRENT_USER, meaning executables run with the privileges of the invoking user, which is standard for packages exposed indirectly through FastFormula compilation and execution rather than called directly by privileged batch code.

The functions in this package encapsulate payroll calculations that are impractical to express in FastFormula syntax alone: hourly rate derivation, actual hours worked, period earnings with proration, statutory absence pay calculations, and period-type conversion. The user search term convert_period_type corresponds directly to a documented function in this package, added at version 115.4 (07-FEB-2005) by sodhingr for use by localization teams.

Key Procedures and Functions

  • GET_HOURLY_RATE — Returns an hourly rate derived from the assignment's salary basis. Originally introduced in version 115.1.
  • CALCULATE_ACTUAL_HOURS_WORKED — Calculates hours worked based on the assignment's work schedule and standard hours. Version 115.3 replaced the convert_period_type dependency with a p_days_or_hours parameter.
  • STANDARD_HOURS_WORKED — Returns standard hours for a period, supporting the actual-hours calculation.
  • CALCULATE_PERIOD_EARNINGS — Computes period earnings and performs proration when core proration is not enabled. Localization teams use this to apply jurisdiction-specific proration logic.
  • CONVERT_PERIOD_TYPE — Converts a period type value, allowing localization and formula logic to reconcile differing period definitions (for example, weekly versus semi-monthly) without hard-coding conversions in FastFormula.
  • TERM_SKIP_RULE_RWAGE — Added in version 115.4 (bug 6718164, 08-Jan-2008) to support termination skip-rule and reduced-wage handling.
  • HOURS_BETWEEN — Returns the number of hours between two dates, used by schedule-based calculations.
  • CALC_REDUCED_REG, CALC_VACATION_PAY, CALC_SICK_PAY — Statutory absence and reduced-pay calculations, typically for localization requirements.
  • GET_UPGRADE_FLAG — Returns a flag indicating whether an upgrade condition applies.
  • GET_NUM_PERIOD_CURR_YEAR — Returns the number of payroll periods in the current year.
  • GET_ASG_STATUS_TYP — Returns the assignment status type, used to gate eligibility in formulas.

Tables Accessed

The package reads and writes payroll and HR tables through APPS synonyms. PAY_ELEMENT_ENTRIES_F, PAY_ELEMENT_ENTRY_VALUES_F, PAY_ELEMENT_TYPES_F, PAY_INPUT_VALUES_F, and PAY_ELEMENT_CLASSIFICATIONS supply element, entry, and input value context. PAY_ASSIGNMENT_ACTIONS, PAY_PAYROLL_ACTIONS, and PAY_ACTION_INTERLOCKS provide payroll run and action context. PAY_RATES, PAY_USER_COLUMNS, and PAY_LEGISLATION_RULES support rate lookup and localization rules, while PAY_ELEMENT_TYPE_EXTRA_INFO stores element configuration attributes. HR_ORGANIZATION_INFORMATION and HR_SOFT_CODING_KEYFLEX supply organizational and costing context, and FND_SESSIONS supplies session-level information for context resolution.

Usage Notes

These functions are not intended for direct invocation by custom PL/SQL. They are registered as user-defined functions for the FastFormula parser, so formulas reference them by name (for example, PAY_CORE_FF_UDFS.GET_HOURLY_RATE(...) or by the short alias defined for the formula type). They execute during payroll run processing, prepayment, and QuickPay, and during element entry validation where formulas evaluate. The package is referenced by one other package, so modification carries a contained but real dependency risk. Because the package is AUTHID CURRENT_USER, custom code calling it must be granted EXECUTE on the package and on the underlying tables. Implementers should treat the UDF signatures as stable API surface: localization patches and payroll legislative updates call these functions, and changes to return semantics can silently alter payroll results across all assignments.