Updated: December 19, 2016

Currency

sap.ui.unified.Currency

Intro

Use this control to display different currencies in a vertical layout, such as in a tablelist, or form. The control ensures that the amount is always aligned to the decimal point.

Usage

Use the currency control if:

  • You need to display amounts with different currencies in a vertical layout, such as in a table, list, or form, and it is important that the user is able to compare the amounts.

Do not use the currency control if:

  • You need to display amounts with the same currency in a table. Use an object number instead.
  • You need to display a number with a unit of measurement that is not a currency. Use an object number instead.
  • You need to display an amount in a structure other than a list, table, or form.

Responsiveness

The currency control supports amounts smaller than 100 trillion, which still fit on a smartphone screen in portrait mode. For larger amounts, the unit of measurement wraps to the next line, which makes it difficult to compare the amounts.

Components

The currency control consists of:

  • An amount, which is formatted automatically according to the user’s locale (using delimiter symbols for the decimal point and thousand separators) and to the currency set for this specific number (number of decimal places). Property: value.
  • A currency expressed as a three-letter code. Property: currency.
Examples of the currency control
Examples of the currency control

Guidelines

  • When you display a unit of measurement, always show the corresponding three-letter code. (property: useSymbol)
  • Display amounts with a maximum of three decimal places. More than three simply increases the white space between other numbers and their units of measurement with no further benefit. Less than three does not work for all currencies. (property: maxPrecision)

Resources

Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.

Elements and Controls

Implementation

  • No links