HANA CDS Graphical Editor – Introduction
CDS Graphical Editor in SAP Web IDE for SAP HANA: An Introduction
This blog is intended for the SAP HANA developer community, that is involved in database modelling for SAP HANA applications using CDS (Core Data Services). This blog will be followed by a series of other blog posts/discussions/how-to guides related to the CDS graphical editor in SAP Web IDE for SAP HANA.
CDS is the data definition language for defining all database artifacts like database tables, custom data types, database views etc. CDS in SAP HANA is a specification, which enables users to create semantically rich and complex data models in SAP HANA, and also allows defining metadata for these database objects.
This is the first blog in the series and is an introduction to the CDS graphical editor in SAP Web IDE for SAP HANA. In the blogs to follow, several important features and capabilities of the tool shall be elaborated upon with relevant examples.
What is CDS in SAP HANA? Is it same as ABAP CDS?! (Well, no.)
Before we get into the details of the CDS graphical editor, it is recommended that you read the blog, which describes what CDS in SAP HANA is, and also how it is same or different from ABAP CDS.
Though these two ‘flavors’ of CDS specification (HANA CDS & ABAP CDS) are more similar than different, this blog focuses only on the CDS graphical editor in SAP Web IDE for SAP HANA that users can use to graphically model CDS artifacts for their database design.
What is CDS graphical editor?
The CDS graphical editor is a very intuitive, easy-to-use development environment for designing and modelling the application database graphically on SAP Web IDE using HANA CDS specification.
The tool’s first version was released with SAP HANA 1.0 SPS 11. It allowed users to graphically create CDS Entities, Contexts & Associations and supported defining various configurations for the created CDS artifact. The current version of the CDS graphical editor in SAP HANA 2.0 SPS00 is a more advanced version and supports many other features for CDS modeling.
Why CDS graphical editor?
For all applications on SAP HANA, it is suggested to use CDS or the Core Data Services for all database modelling. This makes it necessary to have an intuitive development environment, which can enable the database developers to create their database models easily, without having to learn the syntax and semantics of the CDS specifications.
Until SAP HANA 1.0 SPS 10 release, SAP Web IDE for SAP HANA allowed users to create their CDS models using the text editor. The CDS text editor requires the users to know the syntax of creating CDS artifacts. But, from SAP HANA 1.0 SPS 11 release onwards, the CDS models (.hdbcds files) can be created using the graphical editor. The graphical editor works on the basic paradigm of ‘drag-&-drop’ to create CDS artifacts and provides a visual, diagrammatic representation of all CDS artifacts and their relationships with each other. That way, to understand the database model one does not have to go through the code because all database objects can be viewed graphically. After creating the CDS models as desired, users can activate or ‘build’ their modules to generate the corresponding catalog objects in the HDI containers. The activated CDS artifacts result in database tables, columns, views, etc. after activation using HDI (HANA Deployment Infrastructure) which is a part of SAP HANA XSA.
The CDS graphical editor can be used with lot of convenience and ease by developers, who are new to CDS specification in SAP HANA, and also by developers who are well versed with the CDS syntax. The CDS graphical editor presents a pictorial or visual representation of CDS artifacts and their relationships with each other in the database model.
An important point to note here is that the text editor still remains the default editor to open all .hdbcds files. But, users can choose the editor (text or graphical) to create new .hdbcds files, or to open any existing files (from the context menu of the .hdbcds files).
Also remember that a CDS file must NOT be opened using both editors simultaneously on the IDE. The changes made on one editor will not reflect instantly on the other editor if both types of editors are open together. For the changes made via one type of editor (say text editor) to reflect on the second type of editor (i.e. the graphical editor), it is highly recommended that the edited file must be saved, closed and then opened afresh. This will ensure that all changes made in the CDS file are available on both types of CDS editors, the text as well as the graphical one.
As of SAP HANA2.0 SPS00, the CDS graphical editor has following capabilities:
|CDS Artifact||Supported Features|
|User defined data types||
|NDSO (native data store objects)||
CDS graphical editor for SAP HANA vs the ABAP CDS graphical editor
It is important to be aware of the two distinct types of CDS specifications (ABAP CDS and SAP HANA CDS), and also it is equally important to know that the graphical editors for ABAP CDS and SAP HANA CDS are two separate tools, available on two separate development environments.
The ABAP CDS editor is a tool for ABAP CDS modelling on ABAP Workbench and is also available as a plugin on Eclipse.
This link explains about the ABAP CDS graphical editor.
The HANA CDS graphical editor is a tool for modeling SAP HANA CDS artifacts, and is available in the SAP Web IDE for SAP HANA (SAP HANA 1.0 SPS 11 release onwards).
This was your introduction to the CDS graphical editor for SAP HANA. Now, in the upcoming blogs, we will learn how to use it for the CDS modeling. These blogs will also focus on specific features of the graphical editor, one at a time.
- Using CDS Graphical Editor in SAP Web IDE for SAP HANA: Create & Modify CDS Models (.hdbcds files)
- Using CDS Graphical Editor in SAP Web IDE for SAP HANA: Create CDS Entities
- Using CDS Graphical Editor in SAP Web IDE for SAP HANA: Create Associations between CDS Entities
- Using CDS Graphical Editor in SAP Web IDE for SAP HANA: Create User-defined Data Types
- Using CDS Graphical Editor in SAP Web IDE for SAP HANA: Create CDS Views
- Using CDS Graphical Editor in SAP Web IDE for SAP HANA: Create Native DataStore Objects (NDSO)