We use the business rule function " Get Absence In Hours For Period For Time Types() " in the accrual rule for Time Account Annual Leave. The accrual rule evaluates the number of hours for the time types in the accrual period.
The objective of the accrual rule is to prorate the Annual Leave accruals based on a fraction of the working hours, if any of these time types exist in the period.
Running a Time Account Simulation, with a rule trace active, reveals that the function does not detect the existence of the Employee Time record. [Function] Call function 'calculateAbsenceInHoursForPeriodForTimeTypes', result is '0'
It is expected behavior that the rule function returns 0 for the LOA time type, and it is mentioned in EC Time off Implementation handbook as well:
"If the time type is relevant for leave of absence, the rule function returns 0 hours because leave of absence calculation is only based on calendar days".
The rule "Get Absence In Hours For Period For Time Types()" is works as designed because there are technical restrictions.
Also, If we have Leave of Absence time type, then it doesn't makes sense to check the hours.
Do not use this function only for LOA(Leave of absence) time types.
You can use functions " Get absence in days..." instead as this works for all time types including LOA time types:
Get Absence Days
Get Absence In Days For Period
Get Absence In Days For Period Based On Calendar Days()
Get Absence In Days For Period Based On Working Days For Time Types
Get Absence in Days For Period with Threshold()
Rule function doesnt work Get Absence In Hour Get Absence Days Get Absence In Days , KBA , sap successfactors , employee central , get absence in hour , time off , rule function does not work , LOD-SF-EC-TIM , Time-Off , Problem