SAP Knowledge Base Article - Public

3809298 - Business Rule not working as expected for Compensation Information when change is performed via API - SAP SuccessFactors Employee Central

Symptom

When a Compensation Information change is performed via API, the Business Rule configured as OnSave in Compensation Information does not work as expected. 

The Business Rule requirement is to calculate an increase in an specific Pay Component based on the values populated via API, however, the Business Rules continues to fetch the previous value for calculation purposes. 

Environment

  • SAP SuccessFactors Employee Central
  • SAP SuccessFactors HCM Suite

Reproducing the Issue

  1. Upsert a new effective-dated EmpCompensation record, including the following fields:

    • userId
    • startDate
    • seqNumber
    • eventReason
    • payGroup
  2. Upsert a new effective-dated EmpPayCompRecurring record, including the following fields:

    • userId
    • startDate
    • seqNumber
    • payComponent
    • paycompvalue
    • currencyCode
    • frequency
  3. Once both records are saved, observe that while the targeted recurring pay component reflects the newly upserted value, all other derived pay components continue to be calculated based on the previous value rather than the updated one.

Cause

The Compensation Information onSave Business Rule runs when EmpCompensation is processed. In the current API flow, EmpCompensation is upserted before EmpPayCompRecurring, so the rule reads the prior recurring pay component value that has not yet been updated.

Resolution

  • Change the API payload order so that EmpPayCompRecurring records are upserted before the EmpCompensation record for the same effective date and sequence.
  • If using a batch upsert, ensure entries are ordered so that EmpPayCompRecurring is processed first; alternatively, send in separate transactions with recurring pay components processed prior to Compensation Information.

See Also

Refer to:

Keywords

Compensation Information, onSave, business rule, API, OData, upsert order, EmpCompensation, EmpPayCompRecurring, recurring pay component, derived pay components, recalculation, rule trace, Employee Central, compensation change, effective-dated , KBA , LOD-SF-EC-CMP-REC , Recurring Payments , LOD-SF-INT , Integrations , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-EC-CMP , Compensation Information & One-Time Bonus , LOD-SF-EC-BCI , Manage Business Configuration (BCUI) & Data Models (XML) , How To

Product

SAP SuccessFactors Employee Central all versions ; SAP SuccessFactors HCM Suite all versions