Files
cloud-cap-samples/fiori-ext/app/extension.cds
2022-08-29 16:36:36 +02:00

32 lines
774 B
Plaintext

using { sap.capire.orders, OrdersService, sap.common } from '@capire/fiori';
// using { sap.common } from '@sap/cds/common'; //> TODO this creates duplicated definitions
namespace Z_bookshop.extension;
extend orders.Orders with {
Z_priority : String @assert.range enum {high; medium; low} default 'medium' ;
Z_SalesRegion : Association to Z_SalesRegion;
}
entity Z_SalesRegion: common.CodeList {
key regionCode : String(11);
}
// --- UI ---
annotate orders.Orders with {
Z_priority @title : '{i18n>Orders_priority_col}'
};
annotate Z_SalesRegion with {
name @title : '{i18n>SalesRegion_name_col}'
};
annotate OrdersService.Orders with @UI.LineItem : [
... up to { Value: OrderNo },
{ Value : Z_priority },
{ Value : Z_SalesRegion.name },
...
];