Symptom
Your PDI field, which is suppose to display a result of some calculation defined in your custom script, does not show any value, when the result itself amounts to a value less than 1, for example 0.5 or smaller.
Environment
- SAP Cloud Application Studio
- SAP Business ByDesign
- SAP Cloud for Customer
Reproducing the Issue
As a prerequisite you have previously:
- Created a custom solution in Cloud Application Studio.
- Created either a Custom Business Object or extended Standard Business Object.
- Defined an element of data type DecimalValue similar to the below example:
[Decimal(10,4)][Label("ABC")] element DEF : DecimalValue; (where ABC refers to the label of the custom field visible in the UI, and DEF refers to the name of the element in the backend)
- Created a custom script where you are performing some calculation and assign result to your field of datatype DecimalValue.
- After executing your custom logic you notice that this custom field does not display any value, when calculation is equal to less than 1.
Cause
The reason as to why you are seeing an empty field is due to incorrectly maintained property in the UI designer. This field is marked as DisplayEmptyString, under property "Display Behavior on Zero" within properties tab. System considers any value less than 1 as zero, therefore since the condition is satisfied no value is shown in the UI.
Resolution
You need to maintain this property as DisplayValue. Please bare in mind, that if the solution is already deployed, you are no longer able to maintain any changes in the UI designer. Please create a Patch and carry on with necessary adjustments.
Keywords
DecimalValue, Display Behavior on Zero, DisplayValue, Ui designer, unable to see values less than 1 , KBA , AP-RC-UIF-RT , UI Framework Runtime , Problem