SAP Knowledge Base Article - Public

2203238 - Employee central OData API fetches incorrect data for the filter "lastModifiedDateTime"


You are fetching data of employees whose records are modified later than a specific date. However, EC OData API returns user records older than the specified date.

NOTE: Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.


  • SAP SuccessFactors HXM Suite
    • OData API

Reproducing the Issue

OData Request$select=lastModifiedDateTime&$filter=lastModifiedDateTime ge datetime'2015-07-01T17:19:28'&$top=1

OData Response

<title type="text" />
<name />
<link rel="edit" title="EmpJob" href="EmpJob(seqNumber=1L,startDate=datetime'2003-01-01T00:00:00',userId='12345')" />
<category term="SFOData.EmpJob" scheme="" />
<content type="application/xml">
<d:lastModifiedDateTime m:type="Edm.DateTimeOffset">

From the request, we expect that the lastModifiedDateTime is returned for datetime changes made after '2015-07-01T17:19:28'

However, from the response, we observe that API has fetched a record that dates to '2011-10-11T21:44:57Z'.


If you use condition lastModifiedDateTime ge datetime'2015-07-01T17:19:28', any EC API will return not only the data which lastModifiedDateTime is greater than 2015-07-01T17:19:28, but also the record related to deleted records.

More explanation with respect to the above Odata response.
For the above userId "12345", there would be atleast one record which is deleted after the datetime 2015-07-01T17:19:28. Hence the API is returning this user's record for the above request xml.

Best Practice
Therefore, whenever you encounter such results, please check your data in SuccessFactors first.

See Also

If you are trying to delete a timeslice for an employee, make sure that the employee is left with at least one or more timeslices.

If all the records are deleted, the API would not pick their data in the response.


lastModifiedDateTime, cannot, can't, not, working, able, successful, unsuccessful, unable, failed, failing, fails, error, issue, message, throws, throwing, returning, returns, rejecting, rejects, problem, wrong, SF, successfactor, request, integration, call, query, get, payload, response , KBA , old records returned , lastmodifieddatetime issue , LOD-SF-INT , Integrations , Problem


SAP SuccessFactors HCM suite all versions