Compare commits

...

4 Commits

Author SHA1 Message Date
Daniel Schlachter
7e1b33d423 Merge branch 'main' into uom 2025-05-28 11:28:44 +02:00
Daniel Hutzel
ccb61c9b69 feat: add associations for PackagingUnit, Length, and Weight types 2025-05-14 14:13:24 +02:00
Daniel Hutzel
169fda660b feat: add UOM module import to common index 2025-05-14 14:12:19 +02:00
Daniel Hutzel
f3209da2e1 Adding samples for Units of Measures 2025-05-14 14:09:51 +02:00
4 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
code;name
g;Grams
kg;Kilograms
mg;Milligrams
lb;Pounds
oz;Ounces
1 code name
2 g Grams
3 kg Kilograms
4 mg Milligrams
5 lb Pounds
6 oz Ounces

View File

@@ -0,0 +1,11 @@
code;locale;name
g;de;Gramm
kg;de;Kilogramm
mg;de;Milligramm
lb;de;Pfund
oz;de;Unze
g;fr;Grammes
kg;fr;Kilogrammes
mg;fr;Milligrammes
lb;fr;Livres
oz;fr;Onces
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

View File

@@ -1,2 +1,3 @@
using from './currencies';
using from './regions';
using from './uom';

19
common/uom.cds Normal file
View File

@@ -0,0 +1,19 @@
using { sap.common.CodeList } from '@sap/cds/common';
namespace sap.common.uom;
entity PackagingUnits : CodeList {
key code : String(3); // e.g. pc for Piece(s)
abbrev : localized String(3); // e.g. st for Stück
}
entity Weights : CodeList {
key code : String(3); // e.g. kg for Kilogram(s)
}
entity Lengths : CodeList {
key code : String(3); // e.g. m for Meter(s)
}
type PackagingUnit : Association to PackagingUnits;
type Length : Association to Lengths;
type Weight : Association to Weights;