Skip to Content

Format Label Currency - SAPUI5

I am trying format a LABEL text like a currency, but It's not working

Bellow my JS View

new sap.m.Label({
text: "{MyModel>TOTAL_1}",
type: "sap.ui.model.type.Currency",
formatOptions: {
minIntegerDigits: 3
}
 }),

				
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 11, 2017 at 06:10 PM

    I solved it

    	 			  new sap.m.Label({
    				       text: {
    				       path: "MyModel>TOTAL_1",
    				       type: new sap.ui.model.type.Float({
    					   maxFractionDigits: 2
    				       })
    				       }
    				  })
    
    Add comment
    10|10000 characters needed characters exceeded