on 01-27-2017 3:37 PM
We use the sap.m.ObjectNumber to display the number formatted based on the currency key as shown below. I have issues with formatting of the USD vs EUR. The decimal and thousand separator shows the same as shown below. For EUR, I except ',' as decimal seperator and '.' as thousand separator. For USD, I except the opposite. My understanding is that it is formatted based on the regional settings of your computer. However, when I tried to change it , it does not reflect in the UI. Anybody ,please explain how is this thing working.
<ObjectNumber class="sapUiSmallMarginBottom" binding="{/ProductCollection/0}"
number="{ parts:[{path:'Price'},{path:'CurrencyCode'}], type: 'sap.ui.model.type.Currency', formatOptions: {showMeasure: false} }"
unit="{CurrencyCode}" numberUnit="{CurrencyCode}"/>
Hello Nirmal,
There are mutiple ways to handle this . One of the ways is
<ObjectNumber binding="{/}" number="{ parts:[{path:'Price'},{path:'CurrencyCode'}], type: 'sap.ui.model.type.Currency', formatOptions: {showMeasure: false,decimalSeparator : ',', groupingSeparator : '.'} }" unit="{CurrencyCode}" numberUnit="{CurrencyCode}" />
There are other ways as mentioned here
https://help.sap.com/saphelp_uiaddon10/helpdata/en/91/f2f2866f4d1014b6dd926db0e91070/content.htm
Thanks and Regards,
Veera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Do you find any specific reason why it wont work. I found it working Sample Code . Basically there are many ways to override the locale . I checked the internal formatting functions in SAPUI5 and prepared the above code snippet.
Thanks and Regards,
Veera
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.