SAP Knowledge Base Article - Public

2559661 - How to query deleted records using SFAPI

Symptom

  •  User has a requirement to retrieve deleted records in a given time frame
  •  User is using the Compound Employee API

Environment

Compound Employee API

Reproducing the Issue

Customer has a requirement to return deleted record using SFAPI but cannot see the deleted records in the response

Cause

Deleted data is not returned in an API call by default

Resolution

Deleted records from SAP can be retrieved by using SF API CompoundEmployee in Delta mode.

In order to extract deleted data, in the CompoundEmployee API query, one needs to use queryMode= Delta along with other parameters like “last_modified_on“, “fromDate” and “toDate” as shown in the screenshot below. Please note this will not return deleted records per se, but only the delta result considering those deleted records.

IMPORTANT:

Removing toDate and fromDate from a query transforms a period-based delta query into an effective-dated delta query. To learn more about the differences between the two, please check: https://help.sap.com/docs/SAP_SUCCESSFACTORS_EMPLOYEE_CENTRAL/5bb9a5b997a843c88e769a105e4af4d4/a091a70daf7b404b83b01d00b212572c.html

soapui1-1.png

Keywords

Deleted records, SFAPI, Compound Employee, Delta Transmission , KBA , LOD-SF-INT-API , API & Adhoc API Framework , Problem

Product

SAP SuccessFactors HXM Core all versions