Search Results fr_company_work_patterns
Overview
APPS.PAY_FR_SCHEDULE_CALCULATION is a French localization package body that derives and manages work schedules for assignments based on the French company work pattern (FR_COMPANY_WORK_PATTERNS) configuration. It is part of the Oracle E-Business Suite payroll and human resources localization layer, providing the calculation engine that translates soft-coded work pattern definitions into concrete scheduled working days, working hours, holiday classifications, and protected days for a given assignment over a date range.
The package relies on a global variable declared as g_udt_name VARCHAR2(50) := 'FR_COMPANY_WORK_PATTERNS', indicating that the work pattern values are sourced from a descriptive flexfield or user-defined table context. Work patterns are read from the soft coding keyflex (segment5) and the work pattern start day offset is read from segment11, defaulting to a value of 1. The package builds an in-memory array of the assignment's work pattern history and then expands that pattern into day-level records that carry hours, protected flags, public holiday indicators, and absence-related non-working flags.
Key Procedures and Functions
The package exposes eight documented procedures and functions, which collectively provide the full schedule derivation API:
- INITIALISE — Seeds the package-level global variables (assignment, person, business group, assignment start and end dates, work pattern details) by querying the assignment and its associated soft coding keyflex record for the supplied assignment and effective date.
- DERIVE_SCHEDULE — Core routine that expands the identified work pattern across the assignment date range, producing the day-level schedule records.
- HOLIDAY_DAYS — Returns or evaluates the days that fall as public holidays for the schedule, including overrides and days in lieu.
- PROTECTED_DAYS — Returns the days classified as protected for payroll or absence purposes.
- SCHEDULED_WORKING_DAYS — Returns the count (or set) of scheduled working days within the processed period.
- SCHEDULED_WORKING_HOURS — Returns the scheduled working hours for the period, based on the derived day-level hours.
- GET_LAST_WORKING_DAY — Returns the most recent prior working day relative to a given date, based on the derived schedule.
- GET_NEXT_WORKING_DAY — Returns the next working day following a given date, based on the derived schedule.
Tables Accessed
The package reads assignment and flexfield configuration from HR_SOFT_CODING_KEYFLEX and PER_ALL_ASSIGNMENTS_F, which supply the work pattern and pattern start day. Holiday and absence logic draws on PER_STANDARD_HOLIDAYS, PER_STD_HOLIDAY_ABSENCES, PER_ABSENCE_ATTENDANCES, PER_ABSENCE_ATTENDANCE_TYPES, PER_SHARED_TYPES, and PLITBLM (the PL/SQL table-to-integer map used for array lookups). User-defined work pattern tables—PAY_USER_COLUMNS, PAY_USER_COLUMN_INSTANCES_F, PAY_USER_ROWS_F, and PAY_USER_TABLES—hold the pattern definitions and their row/column mappings referenced through the FR_COMPANY_WORK_PATTERNS UDT. No direct writes to core HR or payroll tables are documented; the package primarily performs read operations to build the schedule.
Usage Notes
This package is a localization utility invoked by French payroll and absence processing logic rather than directly by end users. Typical invocation points include French payroll calculation routines, absence and holiday entitlement features, and custom date-sensitive calculations in French legislation reports. The "work_pattern" search term aligns with the segment5 flexfield lookup and the g_udt_name global, reinforcing that users query this package in the context of troubleshooting work pattern setup or schedule derivation. It is referenced by zero other packages, so any calls are made directly from forms, concurrent programs, or custom PL/SQL. When extending or debugging, developers should first call INITIALISE for the target assignment and effective date, then invoke DERIVE_SCHEDULE before calling any of the working day or holiday functions.