SAP Knowledge Base Article - Public

2968760 - Upserting a new EmpCompensation record automatically associates it to a pay component - SAP SuccessFactors OData API

Symptom

  • You're upserting a new EmpCompensation record (Compensation Information time slice) via OData API for a given user;
  • After the upsert, you verify the user's new compensation record and observe that apart from having the pay components specified in the upsert, it has also inherited the same pay components from the previous time slice;

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

Here's a sample scenario:

  1. Employee's current compensation record has pay component 'Hourly Rate':


  2. A new EmpCompensation record is upserted to be effective as of Sep 5 2020;
  3. A new EmpPayCompRecurring record is upserted right after, to be effective as of Sep 5 2020 as well so that it get associated with the new EmpCompensation record. The new pay component is 'Bi-weekly';
  4. However, along with the new pay component, the 'Hourly Rate' pay component from the previous compensation record is also associated to the new compensation record:
  5. This is not the intended result. You want only the new pay component that was upserted to be associated to the new compensation record.

Cause

This is the expected system behavior when importing/inserting a new Compensation Information, as described in 2084794 - Updating Compensation Information Data for an existing user via Import

  • NOTE: All the import behaviors and rules are applicable to OData upserts as well

Resolution

To achieve the desired behavior of keeping only the desired pay components, here is a workaround option:

After upserting the new EmpCompensation record, perform an EmpPayCompRecurring upsert with DELIMIT operation to delete the undesired inherited pay component records that are automatically created by the system.

Example:

  1. You've upserted a new compensation record for user 107030:
    {
                    "__metadata": {
                        "uri": "https://apisalesdemo4.successfactors.com:443/odata/v2/EmpCompensation",
                        "type": "SFOData.EmpCompensation"
                    },
                    "userId": "107030",
                    "startDate": "/Date(852076800000)/",
                    "bonusTarget": null,
                    "payGrade": "GR-06",
                    "payGroup": "CN"
    }

  2. The new record inherited the pay components 'PHONE_CN' and 'BASE_CN' from the previous compensation record, but you want to keep only 'PHONE_CN';
  3. The following operation must be carried out to delete the 'BASE_CN' pay component record:
    {
        "__metadata": {
            "uri": "https://apisalesdemo4.successfactors.com:443/odata/v2/EmpPayCompRecurring(payComponent='BASE_CN',seqNumber=1L,startDate=datetime'2021-01-01T00:00:00',userId='107030')",
            "type": "SFOData.EmpPayCompRecurring"
        },
        "operation": "DELIMIT"
    }

                

Keywords

pay component, comp, record, inherited, copied, previous, duplicate, upsert, update, odata, api, EmpPayCompRecurring, recurring, how to, linked, compensation , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Suite all versions

Attachments

Pasted image.png