Skip to Content
5
Sep 16, 2021 at 04:55 PM

Formatting decimal accondingly unit of measure - Fiori Elements

1545 Views Last edit Sep 16, 2021 at 05:07 PM 3 rev

Hello guys!

We have a requirement to display a quantity field formatting the decimals accordingly unit of measure configuration in a report built using Fiori Elements, like the COOISPI:

COOISPI transaction:

In this transaction the decimals of the target quantity are formatted using the unit of measure configuration, the unit HL has 3 decimals and the UoM PC doesn't have decimals.

In the list reports built using Fiori Elements, the quantity column is always with 3 decimals like the domain of this field:

In the CDS we are using the annotations below:

      @EndUserText.label: 'ProducedQuantity'
      @Semantics.quantity.unitOfMeasure: 'UnitMeasure'
      a.ProducedQuantity as ProducedQuantity,
      @UI.lineItem: [{position: 110}]
      @EndUserText.label: 'UnitMeasure'
      @Semantics.unitOfMeasure: true
      a.UnitMeasure

Is there a way to format the decimals in the column quantity based on the unit of measure configuration in Fiori Elements?

Best regards,

Alessandra

Attachments

329.jpg (44.7 kB)
standard.jpg (42.2 kB)