cancel
Showing results for 
Search instead for 
Did you mean: 

Inheriting anotations from ABAP CDS Views

aalexis
Participant
0 Kudos
90

Hello All,

I am trying to get the text descriptions from the existing CDS that I am referring in my custom ABAP CDS. The underlying cds is I_SalesDocumentItem and this has all the annotations for the characteristics needed such as material, various reason codes, statuses etc. 

In my Custom CDS at the top there is a declaration and I set it as false.

@Metadata.ignorePropagatedAnnotations: false

...

In the CDS definition I am using the association like below

select from I_SalesDocumentBasic as _HDR

association [0..*] to I_SalesDocumentItem as _Item on _Item.SalesDocument = _HDR.SalesDocument

and in the body of the cds I do have foreign key annotation 

@ObjectModel.foreignKey.association: '_SalesOrganization'

_HDR.SalesOrganization,

 

at the end of the CDS I have association added as well...

_Item.

 

In SAC after exposing the CDS thru Composite and Consumption layer, the SalesOrganization

does not show description though the dimension display is set as 'ID and Description' option.

 

But when I use explicitly define an association in the CDS and use the annotation

@ObjectModel.foreignkey.association for another object it shows description in SAC from teh same CDS.

aalexis_0-1737495961591.png

 

Is there anyway I can inherit the text descriptions from the existing CDS rather than redoing allover again?

 

Let me know how to resolve this..

 

thanks,

Arthur.

 

 

 

 

 

View Entire Topic
junwu
Active Contributor

did you expose _SalesOrganization in your cds?