Add suppliers notes app

This commit is contained in:
Uwe Klinger
2021-05-11 09:52:54 +02:00
parent d04cb801c4
commit 016587094f
20 changed files with 10168 additions and 1 deletions

8
notes/db/data-model.cds Normal file
View File

@@ -0,0 +1,8 @@
namespace sap.capire.notes;
using { cuid } from '@sap/cds/common';
entity Notes: cuid {
note: String;
}

View File

@@ -0,0 +1,4 @@
ID,note,supplier_ID
D632D4EE-E772-454A-913E-26A7B8DAA7FB,note1 for 11,11
545A3CF9-84CF-46C8-93DC-E29F0F2BC6BE,note2 for 11,11
24B58115-E394-423B-BEAB-53419A32B927,note3,9980000082
1 ID note supplier_ID
2 D632D4EE-E772-454A-913E-26A7B8DAA7FB note1 for 11 11
3 545A3CF9-84CF-46C8-93DC-E29F0F2BC6BE note2 for 11 11
4 24B58115-E394-423B-BEAB-53419A32B927 note3 9980000082

33
notes/db/mashup.cds Normal file
View File

@@ -0,0 +1,33 @@
using { API_BUSINESS_PARTNER as BusinessPartner } from '../srv/external/API_BUSINESS_PARTNER.csn';
/**
* Supplier data from S/4
*/
@readonly
entity Suppliers as projection on BusinessPartner.A_BusinessPartner {
*,
key BusinessPartner as ID,
BusinessPartnerFullName as fullName,
BusinessPartnerType as customerType,
// TODO: Add issue
// virtual notes: Composition of many Notes on notes.supplier.ID = $self.BusinessPartner;
} excluding {
OrganizationBPName1, OrganizationBPName2,OrganizationBPName3, OrganizationBPName4, to_BuPaIdentification, to_BuPaIndustry, to_BusinessPartnerAddress, to_BusinessPartnerBank, to_BusinessPartnerContact, to_BusinessPartnerRole, to_BusinessPartnerTax, to_Customer, to_Supplier
}
using { sap.capire.notes.Notes } from './data-model';
extend Notes {
/**
* Supplier data from S/4
*/
supplier: Association to Suppliers;
}
// We'cant add the association to the Suppliers projection yet, so we need to put it to the external entity definition
// TODO: https://github.wdf.sap.corp/cap/matters/projects/44#card-195456
extend BusinessPartner.A_BusinessPartner {
// [ERROR] db/mashup.cds:28:5: Only an association that points back to this artifact can be compared to "$self" (in entity:"API_BUSINESS_PARTNER.A_BusinessPartner"/element:"note"/on)
// notes: Composition of many Notes on notes.supplier = $self;
notes: Composition of many Notes on notes.supplier.ID = $self.BusinessPartner;
}

136
notes/db/src/.hdiconfig Normal file
View File

@@ -0,0 +1,136 @@
{
"file_suffixes": {
"csv": {
"plugin_name": "com.sap.hana.di.tabledata.source"
},
"hdbafllangprocedure": {
"plugin_name": "com.sap.hana.di.afllangprocedure"
},
"hdbanalyticprivilege": {
"plugin_name": "com.sap.hana.di.analyticprivilege"
},
"hdbcalculationview": {
"plugin_name": "com.sap.hana.di.calculationview"
},
"hdbcollection": {
"plugin_name": "com.sap.hana.di.collection"
},
"hdbconstraint": {
"plugin_name": "com.sap.hana.di.constraint"
},
"hdbdropcreatetable": {
"plugin_name": "com.sap.hana.di.dropcreatetable"
},
"hdbflowgraph": {
"plugin_name": "com.sap.hana.di.flowgraph"
},
"hdbfunction": {
"plugin_name": "com.sap.hana.di.function"
},
"hdbgraphworkspace": {
"plugin_name": "com.sap.hana.di.graphworkspace"
},
"hdbhadoopmrjob": {
"plugin_name": "com.sap.hana.di.virtualfunctionpackage.hadoop"
},
"hdbindex": {
"plugin_name": "com.sap.hana.di.index"
},
"hdblibrary": {
"plugin_name": "com.sap.hana.di.library"
},
"hdbmigrationtable": {
"plugin_name": "com.sap.hana.di.table.migration"
},
"hdbprocedure": {
"plugin_name": "com.sap.hana.di.procedure"
},
"hdbprojectionview": {
"plugin_name": "com.sap.hana.di.projectionview"
},
"hdbprojectionviewconfig": {
"plugin_name": "com.sap.hana.di.projectionview.config"
},
"hdbreptask": {
"plugin_name": "com.sap.hana.di.reptask"
},
"hdbresultcache": {
"plugin_name": "com.sap.hana.di.resultcache"
},
"hdbrole": {
"plugin_name": "com.sap.hana.di.role"
},
"hdbroleconfig": {
"plugin_name": "com.sap.hana.di.role.config"
},
"hdbsearchruleset": {
"plugin_name": "com.sap.hana.di.searchruleset"
},
"hdbsequence": {
"plugin_name": "com.sap.hana.di.sequence"
},
"hdbstatistics": {
"plugin_name": "com.sap.hana.di.statistics"
},
"hdbstructuredprivilege": {
"plugin_name": "com.sap.hana.di.structuredprivilege"
},
"hdbsynonym": {
"plugin_name": "com.sap.hana.di.synonym"
},
"hdbsynonymconfig": {
"plugin_name": "com.sap.hana.di.synonym.config"
},
"hdbsystemversioning": {
"plugin_name": "com.sap.hana.di.systemversioning"
},
"hdbtable": {
"plugin_name": "com.sap.hana.di.table"
},
"hdbtabledata": {
"plugin_name": "com.sap.hana.di.tabledata"
},
"hdbtabletype": {
"plugin_name": "com.sap.hana.di.tabletype"
},
"hdbtrigger": {
"plugin_name": "com.sap.hana.di.trigger"
},
"hdbview": {
"plugin_name": "com.sap.hana.di.view"
},
"hdbvirtualfunction": {
"plugin_name": "com.sap.hana.di.virtualfunction"
},
"hdbvirtualfunctionconfig": {
"plugin_name": "com.sap.hana.di.virtualfunction.config"
},
"hdbvirtualpackagehadoop": {
"plugin_name": "com.sap.hana.di.virtualpackage.hadoop"
},
"hdbvirtualpackagesparksql": {
"plugin_name": "com.sap.hana.di.virtualpackage.sparksql"
},
"hdbvirtualprocedure": {
"plugin_name": "com.sap.hana.di.virtualprocedure"
},
"hdbvirtualprocedureconfig": {
"plugin_name": "com.sap.hana.di.virtualprocedure.config"
},
"hdbvirtualtable": {
"plugin_name": "com.sap.hana.di.virtualtable"
},
"hdbvirtualtableconfig": {
"plugin_name": "com.sap.hana.di.virtualtable.config"
},
"properties": {
"plugin_name": "com.sap.hana.di.tabledata.properties"
},
"tags": {
"plugin_name": "com.sap.hana.di.tabledata.properties"
},
"txt": {
"plugin_name": "com.sap.hana.di.copyonly"
}
}
}