SAP Knowledge Base Article - Public

2431354 - How to calculate the service anniversary (seniority) of an Employee who had break in service

Symptom

If an employee was terminated and rehired the service time should be calculated.

If an employee has repeatedly been employed at one company, you can sum up all previous employments excluding the current employment.

Resolution

Calculation: function 'Get Work History Days PREVIOUS'

The function sums up the valid days of all Job Info entries before the latest terminated entry where:

•        Employee is active and employee class is not excluded

•        Employee is not active and event is not termination

Limitations

•        Use only with Employee Central.

•        Use an onView event as the work history in days has the character of transient data and not of a persistent value.

 

Example

If you want to calculate the work history in days using all Get Work History functions; the result is displayed in the readable format of years/months/days in custom fields.

This is an example of a rule:

 

WorkHistoryLengthRule.png

WorkHistoryDatesRule.png

 

The result of the calculation is displayed on these custom fields, which you can create using the Business Configuration UI:

 

TriggerRules.png

 

These fields are part of Job Information (jobInfo HRIS element). At the top, you can see the custom fields; at the bottom you can see the onView event that triggers the rule. For each work history calculation result, one custom field (of type "double") is filled with the result in days of the corresponding function. As this result is not readable when it is a high number (for example, 1245 days), then you have to create one custom field (of type "string"), which is filled with the days reformatted into years/months/days using the Convert Days Into YY/MM/DD function. Those fields are set to "visible", whereas the double fields are kept invisible.

Keywords

Rule service anniversary , KBA , LOD-SF-EC-JOB-RUL , Job Info Business Rules , LOD-SF-EC , Employee Central , How To

Product

SAP SuccessFactors Employee Central all versions