Symptom
While trying to perform a self-termination with the 'Termination Date' set in the past date, the system issues and error "You can terminate your employment only on today's date or in the future."
"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
Reproducing the Issue
-
Proxy as the user to be Terminated > Navigate to 'Admin Center' > 'Employee File';
- Click on 'Take Action' > Terminate;
- Set the 'Termination Date' to enter a date in the past;
- Click 'Save' > Error Message appears 'You can terminate your employment only on today's date or in the future.'
Cause
This is default system behaviour: an error is raised when the termination date is earlier than "today".
Code: i.e. DateUtils.compareDateIgnoreTime(terminationDate, today) <0
This will also depend on where the system is located. For example;
- If the local time is Oct 20th, 09:00a.m in Shanghai, and the system time is Oct 19th 18:00p.m in Palo Alto, the current logic will NOT raise an error, because the code is only checking against the date and ignoring the time.
- On the other hand, if the local time is Oct 21st, 12:00a.m in Shanghai, and the system time is Oct 20th, 09:00a.m in Palo Alto, the current logic WILL raise an error.
Resolution
Though the user cannot perform this termination themselves, it is still possible to terminate the user. This can be done either by;
- Proxying as a user with the correct permissions to terminate this user
or
- terminating the user via Import (more details about it in the link https://launchpad.support.sap.com/#/notes/2511979).
See Also
Keywords
Employee Central, Termination, Self-Termination, You can terminate your employment only on today's date or in the future, Current Date, Past Date, Termination Date , KBA , LOD-SF-EC-TER , Termination Details , Problem