cancel
Showing results for 
Search instead for 
Did you mean: 

Adding @UI Annotations to CDS View entity gives OData Error

ganeshv25
Discoverer
142

Hello All,

When I add any @ui annotations to a CDS view / root View entity, then I see red error message at @OData.publish: true . It says,

Multiple markers at this line:
- View has generated objects
- Vocan does not exist [OData Exposure]

 

ganeshv25_1-1718873884822.png

Could you please someone advise, how can i address this ? I guess it is related to Vocabulary annotation.

Attached the screenshot of the error.

Best Regards !

SAP Fiori Elements 

View Entire Topic
MioYasutake
Active Contributor

@ganeshv25 

You should not put the annotation OData.publish: true in root view entities. Root view entities serve as the base CDS view for RAP Business Objects (BO). To expose the view for an OData service based on RAP, create a service definition and a service binding instead of annotating the view with OData.publish: true. If you do not intend to use RAP, simply remove the keyword "root" from the view definition.

https://help.sap.com/docs/ABAP_PLATFORM_NEW/fc4c71aa50014fd1b43721701471913d/289477a81eec4d4e84c0302...

 

ganeshv25
Discoverer
0 Kudos

@MioYasutake :

1. Tried removing ''root", the result is with same error.

ganeshv25_0-1718884147747.png

2. Removed @OData.publish , and created Service Definition and Service Binding with OData V2 - UI, the activation ended with exception without any information :

ganeshv25_1-1718884384841.png

Best Regards !

MioYasutake
Active Contributor
0 Kudos
@ganeshv25 In your CDS View, is there an element named "Vocan"? If you remove OData.publish: true and activate it, does the activation succeed?
ganeshv25
Discoverer
0 Kudos

@MioYasutake,

In your CDS View, is there an element named "Vocan"?

  - No, I do not have any annotations / elements with name 'Vocan' . I guess it denotes Vocabulary Annotation. 

If you remove OData.publish: true and activate it, does the activation succeed?

   - Yes, If I remove the OData.publish, then CDS gets activated without error. When I remove all @UI annotations and add OData.publish then also it gets activated fine.

When I add any @UI annotations, for example, @UI.lineItem: [{ position: 10 }] , and add  @OData.publish and activate, then I get this error "Vocan does not exist [OData Exposure]".

Best Regards !