Symptom
You have configured an Object Value Selector(OVS) in any of your custom screen through your PDI and you expects on the selection to display the field.
However you observe that the leading zeros are truncated to the number upon selection.
Example if 00123 is your field configured, the field appears as 123.
Environment
- SAP Cloud Application Studio
- SAP Hybris Cloud for Customer
- SAP Business ByDesign
Reproducing the Issue
- Go to the affected Work Center in your frontend.
- Select the custom EC(xyz) where you have configured OVS
- Click on the OVS and select the value with leading zero (example 00123)
- You will see that the value is now 123.
Please note xyz is your custom EC field.
Cause
During the execution,backend application writes the OVS field(00123) back to EC field (xyz) to which it is binded to data model in the UI designer.
In the process, it will compare the length of the datatype of OVS filed (00123) and the lenght of the datatype of the EC field(xyz).
If there is a mismatch in the datatype lenght, the precedding 0 gets truncated, as logically 00123 is same as 123.
Resolution
Leading zero's in the custom OVS with data type mismatch with custom EC will be truncated as this is the expected behavior.
Keywords
KBA , AP-RC-UIF , C4C UI Framework , Problem , ZEROTRUCATED , 0 , KBA , AP-RC-BDS-UI , ByDesign Studio UI Generation , Problem