Skip to Content
0
Jul 23, 2018 at 01:35 AM

Question regarding use of associations in ABAP CDS

68 Views Last edit Jul 23, 2018 at 02:21 AM 2 rev

Hi All,

I was trying to build a CDS view and was trying to better understand how associations work. If let's say I build a view zmaterial which as an association _plant to the plant table.

What is the difference between writing:

select from mara

association marc as _plant

{

material, _plant.plant

}

or using the below format

select from mara

association marc as _plant

{

material, _plant

}

My questions are:

1. I assume the second means that it selects all fields from the _plant association (if any are called by the query). But I don't see all fields of plant coming in the output data preview in the second case. What am I missing here?

2. Can tools like analysis for office and SAP analytics cloud read these "association" fields that are not explicitly specified but just mentioned at the end like , _plant ?

_____________________________________________________________________

What I am trying to ask (or confirm my doubts) is if these associations are of any use outside UI5 based tools. Would reporting tools like A40 or SAC even see these fields? My guess is that these associations can not be read and the fields need to be explicitly specified.

Shyam