Files
cloud-cap-samples/orders-ext/app/extensions.cds
Daniel Hutzel 608e16090c Extensibility Walkthrough in capire (#405)
* Extension project template

* SalesRegion ->  x_SalesRegion

* enhanced order repo

* updated package-lock.json
2022-10-04 12:05:57 +02:00

26 lines
721 B
Plaintext

namespace x_orders.ext; // for new entities like SalesRegion below
using { OrdersService, sap, sap.capire.orders.Orders } from '@capire/orders';
extend Orders with { // 2 new fields....
x_priority : String enum {high; medium; low} default 'medium';
x_salesRegion : Association to x_SalesRegion;
}
entity x_SalesRegion : sap.common.CodeList { // Value Help
key code : String(11);
}
// -------------------------------------------
// Fiori Annotations
annotate Orders:x_priority with @title: 'Priority';
annotate SalesRegion:name with @title: 'Sales Region';
annotate OrdersService.Orders with @UI.LineItem: [
... up to { Value: OrderNo },
{ Value: x_priority },
{ Value: x_salesRegion.name },
...
];