Symptom
Error message in time off and time sheet: "Only EmployeeTime of type ABSENCE allowed but category=ATTENDANCE".
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP SuccessFactors Employee Central - Time Off
- SAP SuccessFactors Employee Central - Time Sheet
- SAP SuccessFactors Time Tracking
Reproducing the Issue
- Navigate to Time Sheet UI of an employee.
- Submit Time Sheet
- Error occurs: "Rule "XYZ" execution failed with error "Error happen when invoke rule function: absenceInDaysForPeriodBasedOnCalendarDays, root cause: Only EmployeeTime of type ABSENCE allowed but category=ATTENDANCE"
Note: Error also occurs in the Time off UI while requesting leave.
Cause
This is an expected error message as a validation is introduced in 1H 2021 release.
Time Off rule functions only accepts Time Types classified as 'absence' as parameters & Time Off rule functions must only be used with Employee Times whose Time Types is classified as 'absence'.
However there is business rule where functions like Get Absence In Days For Period Based On Calendar Days For Time Types() is configured with an Attendance, Break, On-Call or Extra category time type.
Possible scenarios for the error include
- There are rules assigned to 'Employee Time' object having time off rule functions where in the input parameter 'Time Types'(or Time type external code), a time type of classfication 'attendance' is used.
- There are alert rules assigned to 'Employee Time' object having time off rule functions and no addition IF condition to check if the time type is of type 'classification'.
Resolution
Please make sure the Get Absence functions are used for only absence time types.
See Also
Keywords
Only EmployeeTime of type ABSENCE allowed but category=ATTENDANCE, attendance, absence, time off, rule function, absenceInDaysForPeriodBasedOnCalendarDays, Get Absence, alert, employee time, employeetime , KBA , LOD-SF-EC-TMS-UI , UI - Errors, Trace, RBP, Permissions, Status , LOD-SF-EC-TIM-UI , Team Absence Calender/ Workbench/ ESS UI's , LOD-SF-TTR-TMS , Time Sheet , Problem