cds Navigating to association in Data Preview




The post describes how to display the content of the association in the data preview of the CDS view.

Create a CDS view on the table SCARR & add all columns in the selection marking the key field.


Data preview & all records appear perfectly.


Now create a new CDS view on the table SPFLI table with association on the previous cds view Ztest_Scarr with cardinality 0..1. In the selection list no fields of the association is added explicitly but the entries alias _Scarr of the view Ztest_Scarr is added.


Data preview. So all the seelcted fields of SPFLI appear in the preview. Now to see the association, select a line and from the header arrow you can navigate to the association.


It displays the result from the association view.


Another way to navigate to the associated view is to right click on the record and from the options Follow Association can enable to view the association data in  the preview.


Choose the association.


Here is the data preview


Now lets create a new CDS view on the table SFLIGHT with selected fields and marking the key fields.


Data Preview.


Now lets use the view Ztest_Sflight in the already created view Ztest_Spfli as an association with cardinality as [0..*]. No fields selected from the association Ztest_Sflight but the association alias name it self added in the selection so that it can be used in some other view to added fields from the association using path expression.


Do a data preview. Select one line and right click , chose Follow Association.


Here we have two association one with cardinality [0..1] for Ztest_Scarr and second with cardinality [0..*] for Ztest_Sflight. Choose the _Sflight association.


All the matching records with key carrid- AA & connid- 0017 displayed in the data preview from the association Ztest_Sflight.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s