Data Preview & Graphical Editor
Create a CDS view on DB table – SCARR and in select choose all fields which can be done by adding individual fields of the DB table SCARR to the view or just mentioning * .
Save and activate the view. The SQ view name and the cds entity name must be different.
in SE11, we can see the SQL view and the view fields and key field information.
In SE11, also the CDS view can be seen.
It is the same as in the Eclipse Editor.
When a CDS View is saved/activated, it uses the SQL statement to create the SQL view in ABAP Dictionary. Just right click on the editor and choose- Show SQL CREATE statement.
It uses below SQL statement to create SQL view in ABAP dictionary.
We can see the data preview of the CDS view. Currently it has no input parameters but a absolute select statement.
Here we can see the result screen of data preview and also we can select the SQL console button where we can see the current select statement made on the CDS entity to see the result.
Here is the SQL console.
Here for the testing purpose we can change the select statement on the CDS view to see the desired result. The same kind of select query we are going to make from our abap report/class on the CDS view.
We can see the CDS view in graphical editor.
Here is the graphical editor.
The CDS view shows * as the result set column.
Now lets little change the CDS view, we don’t need * in selection but need some fields of the table. So put those fields names like below. Save and activate the CDS view.
In SE11 the SQL view and CDS view.
The data preview:
The graphical editor- the CDS view shows the field names.