SAP Knowledge Base Article - Public

3629796 - Amount type field with empty value shows 0 in OData

Symptom

In frontend UI, the field with a type of Amount maintained empty value, but it shows 0 in OData Call.

Environment

SAP Cloud for Customer

Reproducing the Issue

Issue can raise in any Amount Type field, whatever Standard field or Custom field.

  1. Locate to any field with Amount type
  2. In frontend, there is no value maintained, it shows empty
  3. Once checking the OData Service, the field maintained value 0 instead empty

Cause

Different than String type field, which maintained empty value in frontend will shows same empty value in OData. For Amount type field, if you do not maintain any value, the default value of the Amount type field will set as "0,00".

Resolution

This is an expected behavior, even check the developer tool in frontend, the field will also show "content": {"v": "0.0"}; For Amount type field, if you do not maintain the value, it means 0 amount and data returns 0.

Keywords

Amount type field, String, Amount, 0, blank, default value, OData , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem

Product

SAP Cloud for Customer core applications all versions