Symptom
You have encountered a behaviour where the numeric decimal value contained in your upsert is being ignored:
- You Upsert: 1234.50
- UI Result: 12,345 (or 12,345.00)
Environment
- SAP SuccessFactors HCM Suite
- OData API
Reproducing the Issue
You perform an upsert similar to below (but this can technically occur on any field of type double or float)
- {
"__metadata": {
"type": "SFOData.EmpPayCompRecurring",
"uri": "EmpPayCompRecurring"
},
"userId": "TEST_USER",
"startDate": "/Date(123456789000)/",
"payComponent": "PAY_COMP",
"paycompvalue": "1234.50",
"currencyCode": "EUR",
"frequency": "ANM"
}
Cause
The Technical / API user user is configured to use a language which does not use decimal as a separator (e.g. Italian)
In such languages, decimal place serves the same numeric purpose as the comma in English hence it is is ignored
Resolution
To resolve such issues there is two options:
- Change the Technical / API user to one which uses English (or change the language of current user)
Result: "paycompvalue": "1234.50" will achieve the desired result
- Change the format of the upsert payload:
Result: "paycompvalue": "1234,50" will achieve the desired result
Keywords
API, upsert, currency, decimal, place, point, period, comma, separator, ignored, double, float , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , Problem