Skip to Content

Fiori currecny formate based on SU01 decimal notation

Jun 19, 2017 at 03:11 PM


avatar image
Former Member

Hi All,

I have some currency fields on XML/JS views currently I am applying below code

{parts: [
                               {path: 'CreditValue'},
                               {path: 'Currency'}  
                                     type: 'sap.ui.model.type.Currency',
                                     formatOptions: {
        showMeasure: false 

And in SU01 decimal notation is set as "1.234.567,89"

But on UI I can see value is with ',' separated

for ex : 300000000 is displaying like 300,000,000.00 but expected is "300.000.000,00"

Any clues are really helpful



10 |10000 characters needed characters left characters exceeded

Is the decimal notation for the user set as 1.234.567,89 in both the backend and frontend systems?

* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Pavan Bhamidipati Jun 20, 2017 at 07:15 AM


One way I found is to get the user notation format from the User Master and then accordingly in the controller try to set the format options of the control. If it is always the INR format then following are the possibilities:

<mvc:View controllerName="mysap.ui5.demo.walk.controller.App" xmlns:html="" xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m" xmlns:u="sap.ui.unified">
<Page title="{i18n>title}">
<!--<u:Currency value="2300.12" currency="INR" useSymbol="false" />-->
<Text text="{ path: '/number', type: 'sap.ui.model.type.Currency', 
formatOptions: { groupingSeparator: '.'
, decimalSeparator: ','  } }"/>
<!--<Text text="Hello World"/>-->

The other way is use the SAP.UI.UNIFIED reference. and mention the currency type.

Probably you can end up creating your own formatter function.

Thanks, Pavan

10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jun 20, 2017 at 01:36 PM

Hi Pavan,

Thanks for response, yes up to some extant your solutions worked for XML views.For my requirement I need the solution for JS as well.

I am reading user notation from custom service and setting groupingSeparator and decimalSeparator.

JS currency convertion

var formatter = sap.ui.core.format.NumberFormat.getCurrencyInstance({showMeasure: false}, sap.ui.getCore().getConfiguration().getLocale());formatter.format(.Netwr);



10 |10000 characters needed characters left characters exceeded