Extend CDS View

light111CDS View Extension


Normal standard SAP tables can be extended with APPEND structure. Similarly standard CDS views can be extended with EXTEND View which works with the same principle as APPEND structure. There are also some restriction where the CDS view can’t be extended if the CDS base view contains GROUP BY clause, etc.

The below post shows how to extend a Z- CDS view with extend view (the same applies to the standard CDS view).

Below we have a CDS view with some fields from SPFLI table as shown below.

1

The underlying SQL view of the CDS view snapshot from SE11.

2

CDS View data preview( 8 columns)

3


The yellow color fields already added to the CDS view and we need to add the green color fields to the view as a part of extension view.

6

Create a Data Definition.

4

Choose Extend View option-

5

Provide the SQL View Append name and the CDS view name to be extended and the filed list. Activate the extend view.

7

Make a data preview of the base CDS view and it shows the CDS view fields as well as the extension view fields.

8

Open the SQL view APPEND in SE11.

9

It looks as below.

10

The base CDS view is appended with fields of the extend view fields.

11

The base SQL view looks as below-

12


 

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 )

Google photo

You are commenting using your Google 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