Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Annotations

former_member594288
Participant
0 Likes
880

Hi,

I am new to cds and i have one confusion, when we writing vdm views where we have to mention semantic annotations or other annotations. Is it in composite view or consumption view?

1 ACCEPTED SOLUTION
Read only

maheshpalavalli
Active Contributor
0 Likes
794

The idea is that there can be one interface view and multiple consumption views => can be multiple services.

So if you want the annotation to be reusable, then write it at the interface view, maybe a label or something. Else if it is specific to consumption view/service then write it there.

And moreover, we don't even need to write annotations in thw CDs views intself, we can create metadata extensions and write all the annotations there. So these metadata extensions can written for individual CDs views

- Mahesh

3 REPLIES 3
Read only

maheshpalavalli
Active Contributor
0 Likes
795

The idea is that there can be one interface view and multiple consumption views => can be multiple services.

So if you want the annotation to be reusable, then write it at the interface view, maybe a label or something. Else if it is specific to consumption view/service then write it there.

And moreover, we don't even need to write annotations in thw CDs views intself, we can create metadata extensions and write all the annotations there. So these metadata extensions can written for individual CDs views

- Mahesh

Read only

0 Likes
794

Mahesh, when i write @Semantics.unitOfMeasure and @Semantics.quantity.unitOfMeasure annotations in consumption view i am getting an error like "could not resolve field in composite viewname" but when i used the same annotations in composite view the error was resolved. It means we have to include annotations in composite view only?

Read only

0 Likes
794
ravi_sdn probably some annotations like unit of measure have to defined at the lowest level, I couldn't find any documentation about this. But I believe this is an exceptional case, iin case of other annotations, they will work at any level I believe.