Symptom
- Customer requirement is to generate vacation leave entitlement once the employee status becomes REGULAR.
Example: Employee is Probationary from 1st January to 30th June. On July 1, the employee becomes REGULAR. That's the only time the leave should be accrued.
- It's a very common practice in many countries to hire employees as probationary. This is reflected in the employment status field under Job Information. After few months, the employee will either be terminated if he didn't meet the job expectations or will get regularized. As a regular employee, he /she is now eligible to company benefits which include but not limited to ## days of vacation leaves, ## days of sick leave, etc. Querying employee Job Information to grant certain leave entitlements are very common.
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
Cause
If using Job Information fields in an IF condition of the hire/accrual rule to compare the field values, the rule will always take the field value from the hire record (in case of hire rule scenario) or valid as of the Accruable start date for exisitng users and not from the latest Job Information record.
Resolution
This resolution is as per the requirement from this particular customer:
- Create a custom date field in Job Information
- Create an onSave rule with base object as Job Information to set the effective date of the Job Information record into this custom field only if both the fields ‘Employment Status’ and 'Employment Type’ have value as ‘Regular’ else the field will be empty.
Rule Logic is:
IF ‘Employment Status’ and Employment ‘Type’ are ‘Regular’
THEN
Set ‘Custom-date’ equal to Job Information.effective date.
i.e. In the Job Information of the employee, for the first record dated 1st Jan 2017 , this custom date field will be empty but for the second record dated 1st july 2017, the custom date field will have value 1st July 2017:
- Create a lookup with 2 new custom field (cust_LeaveEntitlement and cust_MonthoftheYearNumber) with data type as decimal:
- In Manage Data -> LookupPharex -> Set the month number in the new custom field 'cust_MonthoftheYearNumber' and the leave entitlement in 'cust_LeaveEntitlement'.
Example: If it is January, set ‘cust_MonthoftheYearNumber’ as 1, if April set it as ‘4’ etc.
- Set the hire rule as below(Here the Time account is annualy and accrual is monthly):
- Because in case of hire record it would be null and in that case we are not interested in posting the accrual:
Keywords
SF, success factors timeoff, EC Time off , KBA , LOD-SF-EC-TIM , Time Off , How To