This commit is contained in:
Uwe Klinger
2021-05-07 14:12:01 +02:00
parent 902afd8a76
commit d04cb801c4
6 changed files with 24 additions and 3 deletions

3
suppliers/.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"sbas.lcnc.isCockpitVisibile": true
}

View File

@@ -17,7 +17,11 @@
"requires": {
"API_BUSINESS_PARTNER": {
"kind": "odata",
"model": "srv/external/API_BUSINESS_PARTNER"
"model": "srv/external/API_BUSINESS_PARTNER",
"credentials": {
"destination": "blub",
"url": "http://localhost:3333"
}
},
"[development]": {
"messaging": {

View File

@@ -3,7 +3,7 @@
@bpServer = http://localhost:5001
@authAlice = Authorization: Basic alice:
PATCH {{bpServer}}/api-business-partner/A_BusinessPartner('ACME')
PATCH {{server}}/api-business-partner/A_BusinessPartner('ACME')
Content-Type: application/json
{

View File

@@ -1,6 +1,9 @@
const cds = require ('@sap/cds')
console.log("serverjs")
require('./monkey-patch');
cds.once('served', require('./srv/mashup'))
module.exports = cds.server

View File

@@ -1,5 +1,6 @@
ID;name
ACME;A Company Making Everything (X)
ACME;A Company Making Everything (local)
B4U;Books for You
S&C;Shakespeare & Co.
WSL;Waterstones
1 ID name
2 ACME A Company Making Everything (X) A Company Making Everything (local)
3 B4U Books for You
4 S&C Shakespeare & Co.
5 WSL Waterstones
6

View File

@@ -24,6 +24,16 @@ entity sap.capire.bookshop.Suppliers as projection on S4.A_BusinessPartner {
// REVISIT: following is not supported so far in cqn2odata...
// to_BusinessPartnerAddress.CityCode as city,
// to_BusinessPartnerAddress.CityName as city_name,
//// REVISIT: Should this be here or in the service, when it is only used for Fiori?
//// Compositions should work as well
//// The version with "virtual" is prefered, as this makes clear that the association is "added" here
// virtual books: Association to Books on book.supplier = $self,
// books2: Association to Books on book.supplier = $self,
//// Add virtual field, that does'nt exisits in the persistence or the underlying service
// virtual saveEnabled: Boolean
} excluding {
OrganizationBPName1, OrganizationBPName2,OrganizationBPName3, OrganizationBPName4, to_BuPaIdentification, to_BuPaIndustry, to_BusinessPartnerAddress, to_BusinessPartnerBank, to_BusinessPartnerContact, to_BusinessPartnerRole, to_BusinessPartnerTax, to_Customer, to_Supplier
}