Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit f3209da

Browse files
committed
Adding samples for Units of Measures
1 parent 987611b commit f3209da

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

common/data/sap.common-Weights.csv

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
code;name
2+
g;Grams
3+
kg;Kilograms
4+
mg;Milligrams
5+
lb;Pounds
6+
oz;Ounces
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
code;locale;name
2+
g;de;Gramm
3+
kg;de;Kilogramm
4+
mg;de;Milligramm
5+
lb;de;Pfund
6+
oz;de;Unze
7+
g;fr;Grammes
8+
kg;fr;Kilogrammes
9+
mg;fr;Milligrammes
10+
lb;fr;Livres
11+
oz;fr;Onces

common/uom.cds

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using { sap.common.CodeList } from '@sap/cds/common';
2+
namespace sap.common.uom;
3+
4+
entity PackagingUnits : CodeList {
5+
key code : String(3); // e.g. pc for Piece(s)
6+
abbrev : localized String(3); // e.g. st for Stück
7+
}
8+
9+
entity Weights : CodeList {
10+
key code : String(3); // e.g. kg for Kilogram(s)
11+
}
12+
13+
entity Lengths : CodeList {
14+
key code : String(3); // e.g. m for Meter(s)
15+
}

0 commit comments

Comments
 (0)