cloud-cap-samples icon indicating copy to clipboard operation
cloud-cap-samples copied to clipboard

Adding samples for Units of Measures

Open danjoa opened this issue 8 months ago • 0 comments

Demonstrates how to add common code lists for Units of Measures, like packaging units, weights, lengths, ..., which could then be used like that in own models:

using { sap.common.uom.PackagingUnit } from '@capire/common';

entity SomeDelivery {
  key ID : UUID;
  title : String;
  units : PackagingUnit;
}

Note: As the new entities inherit from sap.common.CodeList provided through @sap/cds/common, they also inherit all related features, like being auto-exposed and automatically provided Value Help on Fiori UIs.

danjoa avatar May 14 '25 12:05 danjoa