2019 Feb 04 4:10 PM
Hi,
I ınstalled 7.50 developer sp02 on my computer. I got warnings when i want to activate Odata publish. I can see that view is created but service is not created, and I dont see my service on /IWFND/MAINT_SERVICE.
could you help me to fx this?
My code as follows:
@AbapCatalog.sqlViewName: 'ZMARA_V_002'
//@AbapCatalog.compiler.compareFilter: true
//@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'ZMARA_DDL'
@ObjectModel.semanticKey: ['matnr']
@OData.publish: true
define view ZMARA_DDL as select from zmara
{
matnr,
maktx
}
2019 Feb 04 4:45 PM
Hi,
I ınstalled 7.50 developer sp02 on my computer. I got warnings when i want to activate Odata publish. I can see that view is created but service is not created, and I dont see my service on /IWFND/MAINT_SERVICE.
could you help me to fx this?
My code as follows:
@AbapCatalog.sqlViewName: 'ZMARA_V_002'
//@AbapCatalog.compiler.compareFilter: true
//@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'ZMARA_DDL'
@ObjectModel.semanticKey: ['matnr']
@OData.publish: true
define view ZMARA_DDL as select from zmara
{
matnr,
maktx
}
2019 Feb 04 4:45 PM
2019 Feb 04 5:29 PM
Matnr column is already key in main table Zmara. Did you mean that?
2019 Feb 04 5:53 PM
No, you need to make a field in the CDS view as key field so that it generates the OData service and creates the entity for that.. Even if you manually create a odata service, it is required to mention atleast one of the field in the entity as the key field. So here also in the CDS view it is required to mark one as a key.. (It will not take key from zmara btw, you need to explicitly mention it)
define view ZMARA_DDL as select from zmara
{
key matnr,
maktx
}
BR,
Mahesh
2019 Feb 04 6:19 PM
2020 Dec 28 10:06 AM
Hi,
If you want to consume cds views in odata then rules should be meet are:
1. cds view should have at least one primary key in it.
2. no syntax error in ddl.
3 The length of cds view name should not be greater than 16
if above mentioned rules are fulfilled then in /IWFND/MAINT_SERVICE. we can find services.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |