cancel
Showing results for 
Search instead for 
Did you mean: 

How to reuse (merge) OData annotations?

pepl
Active Participant
0 Kudos

Dear experts,

Does anyone know how to reuse some parts of OData annotations?

Let's say we have an example:

We have two OVP cards. Each of them requires separate filter, defined in UI.SelectionVariant annotation.

However this filter can have a common condition.

What we do now - we annotate these cards separately and maintain filters synchronously which is not nice.

I tried to use construction Annotation -> Reference -> includeAnnotation but it didn't work.

I guess it must be something very simple - but I didn't find any anwer in SDK.

Can edm:AnnotationPath be useful?

Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If I understand you correctly, you want to use the same annotations for multiple cards.

Have you tried using qualifiers?

After specifying them in CDS, you can use the same in the cards as 'something.annotation#qualifierName'

pepl
Active Participant
0 Kudos

Hi,

Not exactly. Let's say I have condition A - it's set of different parameters. Same for B and C.

Now one card I need to annotate with A and B. Other one with A and C.

What I do now I create two annotations with two different qualifiers and copy A to both which leads to code duplication.

I didn't find the way how I can create annotation containing only A (UI.SelectionVariant for example) and reuse it in other annotations along with B and C conditions.