SAP Knowledge Base Article - Public

3050783 - Error "Only EmployeeTime of type ABSENCE allowed but category=ATTENDANCE"

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

Reproducing the Issue

  1. Navigate to Time Sheet UI of an employee.
  2. Submit Time Sheet
  3. 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'.

Possible scenarios for the error.

  1. 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.
  2. 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'.

Handbook: Implementing Employee Central Time Management: Notes on Rule Functions in Time Off

Resolution

  1. There are rules assigned to 'Employee Time' object having time off rule functions where in the input parameter 'Time Types', a time type of classfication 'attendance' is used.
    • In input parameter of the rule function, use only time type of classification 'absence' (As time off rule functions should be used only for time off related time types). Example Rule:

Time_Type.jpg

Rule.jpg

2. There are Alert rules assigned to 'Employee Time' object having time off rule functions.

    • Add an additional IF condition in the rule as shown in the screenshot below:

Rule_2.jpg

See Also

Implementing Employee Central Time Management: Notes on Rule Functions in Time Off

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 , Problem

Product

SAP SuccessFactors Employee Central all versions ; SAP SuccessFactors HCM Core all versions ; SAP SuccessFactors HXM Suite 2105 ; SAP SuccessFactors HXM Suite 2111 ; SAP SuccessFactors HXM Suite 2205 ; SAP SuccessFactors HXM Suite 2211 ; SAP SuccessFactors HXM Suite 2305