SAP Knowledge Base Article - Public

2863033 - Error On Get Number Of Calendar Days() Rule Function


  • The function Get Number of Calendar Days() throws an error if start date is greater than end date.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.


SAP SuccessFactors Employee Central -  Time Off

Reproducing the Issue

 Get Calendar Days.png


  • Before b1911 release, there existed no validation to check if the start date entered in the function is on or before the end date entered in the function, which lead to unexpected results as the rule function was not designed to be called with a wrong order.
  • Hence Engineering enhanced the behavior by adding a data validation message.


  • The function will throw a validation error when start date > end date during rule execution.
  • The existing rules will need to be modified to accomodate this validation, if there is a possibility of rule function having start date > end date. E.g. Before using the function in a set statement, please add an if condition to check if start date to be entered in the function is on or before the end date. Example Screenshot:
    additional check in rule.png


Get Number of Calendar Days, getCalendarDays, Validation, TIM-10774, Time Off, Business Rules, Employee Central Error happen when invoke rule function The start date is after end date , KBA , LOD-SF-EC-TIM , Time Off , Problem


SAP SuccessFactors Employee Central 1911 ; SAP SuccessFactors HXM Core 1911