Address lookup to mocked S/4HANA system
What's working: - Address information on OP - Reading of S/4HANA Addresses - Translations
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
namespace sap.capire.bookshop;
|
||||
using { Currency, managed, cuid } from '@sap/cds/common';
|
||||
using { API_BUSINESS_PARTNER.A_BusinessPartnerAddress as extAddresses } from '../srv/external/API_BUSINESS_PARTNER.csn';
|
||||
|
||||
entity Books : managed {
|
||||
key ID : Integer;
|
||||
@@ -26,6 +27,7 @@ entity Orders : cuid, managed {
|
||||
Items : Composition of many OrderItems on Items.parent = $self;
|
||||
total : Decimal(9,2) @readonly;
|
||||
currency : Currency;
|
||||
shippingAddress : Association to one ShippingAddresses; // TODO: Composition or Association?
|
||||
}
|
||||
entity OrderItems : cuid {
|
||||
parent : Association to Orders;
|
||||
@@ -33,3 +35,11 @@ entity OrderItems : cuid {
|
||||
amount : Integer;
|
||||
netAmount : Decimal(9,2);
|
||||
}
|
||||
|
||||
// TODO: Use external information
|
||||
entity ShippingAddresses {
|
||||
key AddressID: String;
|
||||
CityName: String @readonly;
|
||||
StreetName: String @readonly;
|
||||
HouseNumber: String @readonly;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user