When trying to import Alternative Cost Distribution (empCostDistribution API) for an employee using OData API – UPSERT,
API Response shows below error.
"key" : null, "status" : "ERROR", "editStatus" : null, "message" : "The total of the percentages for all cost centers must not be greater than 100%. with the index 0", "index" : 0, "httpCode" : 500, "inlineResults" : null
Successfactors HCM Suite
Reproducing the Issue
1. Upsert alternative cost item distribution via odata api
2. Encounter Error similar to symptom
Instead of deimiting old record for the new record, the system updates with all information including old record.
- You can enter up to 12 cost centers for one employment.
- The total percentage of all cost centers cannot be higher than 100 %.
- If the total percentage of all cost centers entered in the Alternative Cost Distribution portlet is less than 100 %, the remaining percentage is deducted from the cost center Foundation - Object that has been maintained for the employee.
- You can also add the cost center that has been maintained as Foundation Object for the employee in the Alternative Cost Distribution portlet.
Use purgeType=record parameter
Follow below upsert request sample
1st : Update with 1 cost center
Request Payload :
"effectiveStartDate":"/Date(1565309520000 <insert in epoch time format>)/",
EmpCostDistribution_effectiveStartDate=datetime'2019-08-09T00:12:00.000Z <insert in UTC time format>'
"percentage": "<insert percentage>"
EmpCostDistributionItem , EmpCostDistribution , Alternative Cost Distribution, The total of the percentages for all cost centers must not be greater than 100%. with the index 0, purgeType=record, Odata API upsert , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , Problem