# I want to round a number to 2 decimal places in SAPUI5. Could anyone help?

SAP HANASAPSAP Basis

RoundingMode function is used for rounding the number and it uses these parameters: number and how many decimal digits.

## Example

You can roundoff and your code will be like this:

<Input value="{
path: 'helloPanel>/recipient/amount',
type: 'sap.ui.model.type.Float',
formatOptions: {
maxFractionDigits: 2,
roundingMode: 'away_from_zero'
}
}"/>

Published on 18-Dec-2017 07:33:51