SAP Knowledge Base Article - Public

3778096 - error "error happened when invoking rule function: getAbsenceInDaysForPeriodBasedOnWorkingDays" Cannot read field "intCompact" because "<parameter1>" is null”

Symptom

  • When selecting a leave type and changing the start date on EmployeeTime, a brief error appears: Rule execution failed with error “Error happened when invoking rule function: getAbsenceInDaysForPeriodBasedOnWorkingDays, root cause: Cannot read field "intCompact" because "<parameter1>" is null” 

Environment

SAP SuccessFactors Employee Central

Reproducing the Issue

  1. Configure an onchange rule under Start Date to calculate the absences in past working days using rule function:get Absence In Days For Period Based On Working Days
  2. Open an EmployeeTime record and choose leave absence type.
  3. Modify the Start Date.
  4. Observe the brief error message.

Cause

Rule is wrongly configured. (Option)Employee Employee should be leave blank if you are not using Take Rule.

Resolution

  1. Open the business rule configured for the EmployeeTime on-change (for the Start Date field).
  2. Review the rule parameters and conditions for any reference to the (optional) Employee Time parameter.
  3. Remove the (optional) Employee Time parameter inserted from the rule (it is only meant for take rules).
  4. Save the rule and clear any caches as per standard practice.
  5. Re-test by selecting leave type and changing the Start Date to confirm the error no longer appears.

See Also

Get Absence In Days For Period Based On Working Days For Time Types()

The employee time is only necessary if you use the rule function in a take rule. 

Keywords

EmployeeTime, on-change rule, time off, sick leave, hospital leave, getAbsenceInDaysForPeriodBasedOnWorkingDays, error happened when invoking rule function, null root cause, used days calculation, take rule, optional employee time, start date change, rule function failure, time management rules , KBA , LOD-SF-EC-TIM-ABS , Absence error's - Calculations, Deductions, TT&ET , How To

Product

SAP SuccessFactors Employee Central all versions