Symptom
After upgrading from an older cds version (prior to 2024 June releases) to the latest one, the following issue is visible in the CAP application:
Decimal values returned as strings:
Decimal fields (e.g., Decimal (20,2)) are now returned as strings in the service response.
Example:
"currentValue": "20.34"
Expected Behavior (Previous Version):
"currentValue": 20.34
and also
Decimal truncation (0.00 → 0)
Observed Behavior:
"currentValue": "0"
Expected Behavior:
"currentValue": "0.00"
Possible Impacts:
- Consuming systems fail validations or arithmetic operations expecting numeric values.
- Causes data mismatches and logic errors in downstream systems.
- Precision and validation logic are affected where exact decimal format is required.
- Causes downstream system validation failures for financial and calculation fields.
Read more...
Environment
Business Technology Platform
Product
Keywords
BTP, decimal, CAP, cds, version, application, upgrade, validation, value, functionality , KBA , BC-XS-CDX-NJS , SAP CAP – node.js runtime , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview