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:
D065023
2019-11-30 14:17:17 +01:00
parent ed3ecd502f
commit 4a2139a5f2
13 changed files with 5892 additions and 18 deletions

View File

@@ -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;
}