SAP Knowledge Base Article - Public

3153070 - No EmpEmploymentTermination record visible for employee which was rehired - SAP SuccessFactors OData API

Symptom

A query to the EmpEmploymentTermination entity returns no record related to an employee which had been terminated in the past, but is now rehired and active.

NOTE: 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 HXM Suite

  • Employee Central
  • OData API

Reproducing the Issue

Sample terminated employee with personIdExternal '123':

Querying EmpEmploymentTermination of this employee will return a record:

Request

GET https://<apiURL>/odata/v2/EmpEmploymentTermination?$filter= personIdExternal eq '123'

Response

Now, if the employee is rehired, the same query to EmpEmploymentTermination will not return any record:

Cause

Working as designed.

Resolution

The data of EmpEmploymentTermination is a subset of EmpEmployment, with condition "endDate != null". Once an employee is terminated, the value of endDate will be filled and the termination data is available under EmpEmploymentTermination. However once the employee is rehired, no matter the rehire date is the past or future, the value of endDate will be reset to null. Then this record is unavailable under EmpEmploymentTermination.

Since EmpEmployment and EmpEmploymentInformation are not effective-dated entities, they also do not keep a history of termination data. So supposing the following scenario:

  1. Employee terminated
  2. Employee rehired
  3. Employee terminated again

Only the latest termination details can be queried via OData API. The data from the first termination is replaced by the the second termination.

Keywords

termination, ec, employment, odata, api, query, blank, null, no, result, missing, record , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT , Integrations , LOD-SF-INT-ODATA , OData API Framework , Problem

Product

SAP SuccessFactors HCM Suite all versions