cloud-cap-samples
cloud-cap-samples copied to clipboard
Adding samples for Units of Measures
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.