Skip to Content
0

Add Annotations to OData Service based on exposed CDS View

Mar 15, 2017 at 03:03 PM

312

avatar image

Hi Experts,

we have exposed a CDS View via OData Annotation (@OData.publish: true). I know that a lot of annotations for such an OData service can be achieved by using various CDS annotations but how can I add some vocubulary based annotations to such an Odata Service that are not available for CDS yet e.g. a term like "com.sap.vocabularies.Common.v1.ValueList"?

Is there a way to create an OData extension project for these special kind of services? Though the regular extension (with OData Extension Projects in the service builder) technically works I encountered several issues that I couldn't fix.

Regards

Tobias

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Christian Wolter Mar 23, 2017 at 10:37 AM
0

Dear Tobias,

you could create an annotation model project in SEGW. In this project you can reference your service and add annotations like in the vocabulary-based annotations service. The annotation model will be also suggested in Web IDE, when you create a new application for your service.

Best Regards

Christian Wolter


anno-project.png (14.7 kB)
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi,

thanks for your reply. I did this once for a "Service with SAP Annotations" to add some vocabulary based annotations without coding and it worked fine. In this particular case here my original service already uses vocabulary based annotations. Is it possible though to use a referenced annotation model using the same vocabularies. Since my original service is a generated one I cannot manipulate the annotations there.

Regards

Tobias

0

I can reference a CDS-published service in an annotation model project in SEGW.

0
Seungchul Yang Mar 16, 2017 at 01:46 AM
0

You can add a local annotation to your package by SAP Web IDE.

It provides a Annotation Editor.

Share
10 |10000 characters needed characters left characters exceeded