Exploring HANA CDS Views With Graphical Editor..! When would S/4 HANA ABAP CDS be Graphical ?
I recently started working on HANA 2.0 SP 02, on XS Advanced server using Wed IDE for HANA as the designer tool to create all the database artifacts in HANA system. I feel that, Web IDE for HANA has got the better development options with HDI container deployment and GitHub source control. It makes sense to consider as a successor to HANA Studio. It is used not only for Database developments, but also for Node.js module and Web module developments.
In Web IDE for HANA, one of the interesting feature I wanted to talk about in this blog is Graphical Editor for Creating CDS tables and Views. With that, developer gets user friendly Graphical editor with drag and drop options to create CDS artifacts which results in less effort to build the objects. Also require less training to get expertise. Let us go through a bit detailed on how we create them graphically by avoiding CDS code. Of course, you can still open and modify the Graphically created CDS Views in Text editor and Vice Versa.
Note: I am referring strictly Native HANA CDS views, not ABAP CDS views used in S/4 HANA.
For this illustration, I am using HANA Express edition running on XS advanced server.
Firstly, I am creating a CDS document:
In Web IDE for HANA, in my Developer work space, Create a Project and Data base module.After that creating a new CDS Artifact.
In that document, Create a CDS entity which is my Table, Vendor with all the required fields added as shown in the below screen shot, in my system it is graphical editor by default. It is because, I have set my default editor as Graphical.
After saving the Entity, I can open it using Text editor. In Text editor, I can further make changes to the code, by adding some more fields and save it and those changes get reflected in Graphical editor.
Secondly, In the Graphical editor, I can update the Properties of the table which are row Store or Column store, Auto merging etc.. also, I can indexes and Partitions also can be configured. Which we always can do using Text editor.
In the next step, I created another table entity which is Purchase order and making association to Vendor table.
this association is graphically configured by making source and target cardinality settings. Then I create CDS view on these 2 tables, In the view I can have a join condition, group by, where clause etc.. I named the CDS view as PO Analysis. Now I am displaying the CDS view in Text editor as shown below.
Similarly, we can create several CDS views in the document. Also We can enable the document for Odata publish to consume externally in Analytics applications.
I can also Create CDS Context for all the above tables and views together using Graphical editor, nesting CDS context is also possible in Graphical editor.
Since my object development is completed, I will start the building the object, therefore run time objects are deployed in Database explorer with in the HDI container.
you can see naming conventions are automatically taken from the project, DB module name and CDS document. I can display the data here, or I can use these tables in Calculation views or Stored procedures.
There are more updates on Graphical editor are expected to come HANA 2.0 SP 03. You can find SAP help documentation on this topic here CDS in Graphical Editor.
also, there are You tube Videos available in HANA academy channel on this topic, which are very helpful.
When Would I get S/4 HANA ABAP Graphical CDS
In Other world, we have the CDS artifacts in ABAP flavor used for S/4 HANA models in order to create data persistence and also CDS views for S/4 HANA analytics. I noticed that, ABAP CDS syntax is also very similar to HANA CDS syntax, Entity, views, associations, annotations and Context are using the same coding principles on both sides. In ABAP CDS, graphical editor is limited to only display purpose.
By knowing that, I ask myself a question, Will there be a Graphical editor for ABAP CDS also? if yes when? I believe I am not the only person who has this question, as you may also thought about it. I do n’t have answer to that at this moment.
Actually ABAP CDS is available as part of ABAP Development tools(ADT) Plug in, which you can install either in HANA studio or Eclipse to work on the developments. I am guessing, Since HANA studio is deprecated, we may have to use ADT in Eclipse tool in future. Graphical editor may take some time, because of lot of ABAP annotations, supporting open SQL are to be considered in detailed to release the graphical editor. Therefore., I am waiting to hear from SAP on this context, hope there is going to an update soon.