SAP Knowledge Base Article - Public

3115336 - Record in Compound Employee API response is retrieved with action code CHANGE, when NO_CHANGE would be the correct value - SAP SuccessFactors HXM Suite

Symptom

You're running a Compound Employee API query in delta mode, and one or a few records which were not modified after the given 'last_modified_on' timestamp parameter are returned with action code CHANGE instead of NO_CHANGE.

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
  • Compound Employee API

Reproducing the Issue

Sample scenario

  1. An employee had a 'Supervisor Change' job information record inserted on September 30, 2021



  2. The only other job information record which exists besides the new 'Supervisor change' record is the 'New position' record (hire), and it hasn't been modified since a year:



  3. We run a Compound Employee query with queryMode delta to fetch this employee:

    SELECT person, address_information, email_information, emergency_contact_primary, employment_information, compensation_information, paycompensation_recurring, job_information, national_id_card, personal_information, phone_information
    FROM CompoundEmployee
    WHERE last_modified_on > to_datetime('2021-09-01T01:00:00Z') and person_id_external = <sample_employee_id>

  4. Given that we're running the query with last_modified_on > September 2021 and the only change that happened since that date is the insertion of the 'Supervisor change' job information record, that job information record is the only one that should be returned with action code 'CHANGE' (as per Insertion of a Time Slice - SAP Help Portal). The first record with event reason 'New Position' should be retrieved with action code 'NO_CHANGE'.

  5. But this is not what we see in the response. Not only 'Supervisor change' record is returned with action code 'CHANGE', but also the old 'New Position' record which was last modified around 1 year in the past, on 2020:

Cause

First, please cross-check if your scenario is documented in the following pages, and confirm that Compound Employee is not behaving as documented:

If you've confirmed that the record's action code is not being returned as documented:

Going back to the sample scenario above for reference, we can see that despite the 'last_modified_on' field value of the record falsely returned with action code 'CHANGE' being 2020-09-23 (1 year in the past), the record also contains field(s) with the '_previous' suffix, which indicates that the value of those fields was in fact changed recently.

Example

Therefore, Compound Employee API is behaving as expected and is not where the root cause of this issue lies. Since it detects a change to some field values, the record is returned with action code 'CHANGE'.

Still, the changes were not done by any user or regular business process, because the 'last_modified_on' timestamp of the record was not updated. The root cause for this undesired apparent change lies on Employee Central's Centralized Services framework:

  • When some Employee Central records are processed across the system, Centralized Services updates the values of fields which are not enabled in the Data Model to default values (such as '0' or 'false'). Compound Employee API will detect those occurrences as changes and attribute the action code 'CHANGE' to the affected records.

Resolution

The fix to the behavior of the Centralized Services framework does not have a concrete ETA yet, since it requires extensive planning and testing.

However, as a workaround to prevent the incorrect 'CHANGE' action codes in Compound Employee:

  • Add the 'configuredFieldOnly' value to the 'resultOptions' parameter of your Compound Employee request. You may refer to Overview of Query Parameters - SAP Help Portal. With this parameter, Compound Employee will ignore fields which are not configured in the data model and as a result, the action codes will not be affected anymore by the undesired changes produced by the Centralized Services framework.

Keywords

ce, api, time-slice, time, slice, change, no, false, wrong, wrongly, returned, returning, response, payload, result, results, record, ec, job_information, compensation_information, effective, dated, last_modified_on, last, modified, timestamp, time, changed, modified, ECT-176985, ECT-176804, delta, since , KBA , LOD-SF-INT-CE , Compound Employee API , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Suite all versions

Attachments

Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png