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
-
Upsert a new effective-dated
EmpCompensationrecord, including the following fields:userIdstartDateseqNumbereventReasonpayGroup
-
Upsert a new effective-dated
EmpPayCompRecurringrecord, including the following fields:userIdstartDateseqNumberpayComponentpaycompvaluecurrencyCodefrequency
-
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:
- 2331851 - Employee Central - Business Rules - SAP for Me
- 2344204 - SuccessFactors Compensation Implementation Tips & Tricks - SAP for Me
- 2085185 - Using SFAPI and defining API comp-group ID feature - Compensation - SAP for Me
- 3274812 - Access for all calculated fields of Compensation information with OData API - SAP for Me
- 2085185 - Using SFAPI and defining API comp-group ID feature - Compensation - SAP for Me
- 3788202 - Pay Component deletion not applied when Workflow is initiated by API Upsert - SuccessFactors Employee Central - SAP for Me
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
SAP Knowledge Base Article - Public