SAP ABAP CDS Views vs. SAP HANA CDS Views – What Are the Differences?

CDS Views

SAP ABAP CDS views and SAP HANA CDS views are not the same, but they are similar. They are two different shapings of one concept. Both are based on the same specifications, but they pursue different aims.

SAP CDS Views

SAP CDS views are part of SAP’s new programming model. The new programming model’s core idea is to push the logic from the application server to the client-side and the database. And CDS views are part of pushing the logic to the database, plus to the client-side as well.

SAP calls pushing the logic from the application server to the database ‘code-to-data’ or ‘code-pushdown’ in the context of the new programming model. SAP CDS views execute the ‘code-to-data’ or ‘code-pushdown’.

CDS views push the logic to the database because they take most of the logic from an ABAP application and execute it on the database, instead of on the application server.

SAP's new programming model that includes SAP CDS views which push code from the application server to the database - code to data.
SAP’s new programming model – code to data and not data to code.

Furthermore, CDS views push the logic to the client-side, because CDS views are able to control SAP UI5 Smart Controls and SAP Fiori Elements by annotations through OData services that can be generated from a CDS view. Therefore, the logic goes to the client-side as well, because CDS views can delegate the logic of certain SAP UI5 controls.

CDS views are from a similar concept to ABAP dictionary views: they provide pre-defined SQL queries to one or more database tables. This allows for effectively and comfortably connecting to and accessing data.

However, an ABAP CDS view can do a lot more than an ABAP dictionary view. An ABAP dictionary view is actually just an ABAP structure. An ABAP CDS view generates an ABAP structure as well, but also much more. Overall, an ABAP CDS view generates or can generate an

  • ABAP structure,
  • database structure,
  • Open SQL structure, and
  • OData service.

Before CDS views, ABAP code mainly held the logic of an ABAP application and that logic was processed by an application server. Now large parts of the logic of an ABAP application can be outsourced from the ABAP code to CDS views and therefore from the application server to the database.

However, that is what ABAP CDS views and HANA CDS views have in common. Now, on to the differences between ABAP CDS views and HANA CDS views.

SAP ABAP CDS Views

SAP ABAP CDS views are defined at the level of the ABAP application server. The views are created and maintained in DDL (Data Definition Language) files, which reside in the ABAP application server. They are part of the Data Dictionary (SE11) and therefore, part of the ABAP transport system, life cycle management, etc.

The views use Open SQL. ABAP CDS views aim to support the development of ABAP applications. The type of database system is irrelevant – it does not have to be a HANA database. Therefore, the main focus of ABAP CDS views is to create views.

ABAP CDS views

  • reside in the application server,
  • work with any database,
  • use Open SQL,
  • aim at ABAP applications, and
  • main focus to create views.
SAP ABAP CDS views reside in the application server in the Data Dictionary but processing the logic in the database.
SAP ABAP CDS views reside in the application server in the Data Dictionary but process the logic in the database.

SAP HANA CDS Views

SAP HANA CDS views are defined at the HANA database level. The views are created and maintained in DDL files, which reside at the database level in the HANA XS (HANA Extended Application Services). The views use Native SQL.

HANA CDS views aim to support the development of the native SAP HANA applications. They use features that are specific to SAP HANA. Therefore, they can only be used with a HANA database. The main focus of HANA CDS views is to create models on the HANA database itself.

HANA CDS views

  • reside in the HANA database (HANA XS/XSA),
  • work only with a HANA database,
  • use Native SQL,
  • aim at native SAP HANA applications, and
  • main focus to create models.
SAP HANA XS 2-tier architecture.
SAP HANA XS 2-tier architecture – SAP HANA CDS views reside in the HANA database.

Compatibility Between SAP ABAP CDS Views and SAP HANA CDS Views

SAP ABAP CDS views and SAP HANA CDS views are two different CDS implementations. Their technical compatibility is not guaranteed, because

  • They run on different platforms: ABAP CDS views reside in the ABAP application server (ECC, S/4), but HANA CDS views reside in the HANA database (HANA XS).
  • They have different requirements: ABAP CDS views support the development of ABAP applications, but HANA CDS views support the development of native SAP HANA applications.

Therefore, ABAP CDS views and HANA CDS views have different functionalities and release cycles.

Differences between SAP ABAP CDS Views and SAP HANA CDS Views

 ABAP CDS ViewsHANA CDS Views
ResideApplication serverHANA XS
DatabaseAny databaseOnly HANA
SQLOpen SQLNative SQL
AimABAP applicationsNative HANA applications
Main focusCreate viewsCreate models
Analytics intendedYesNo

These are the differences between SAP ABAP dictionary views and SAP ABAP CDS views.

See here for best practices for SAP ABAP CDS views.

11 Comments

FREE SAP Modules Overview! (Complete)

Plus, receive all future infographics and SAP tips & insights that are only shared with the private newsletter subscribers. 

Latest Poll
Essential Ressources

11 Comments. Leave new

Entrenamiento SAP
July 22, 2019 00:42

Very nice, but, what is a difference HANA CDS view and Calculation VIEW? what is better? Best Regards!

Reply

    Thanks! Regarding your question: It depends on what you would like to archive but in general use SAP ABAP/HANA CDS views as much as possible. Use calculation views if they provide features that ABAP CDS views do not provide yet, such as automatically exposing multidimensional data models for MDX clients.

    Reply

Excellent blog! We are having green field implementation for S/4 HANA. There may be use case to convert some of our existing calculation views (based on HANA DB) to CDS views. If so, should we convert them to ABAP CDS views or HANA CDS views? Which is better approach, and why?

Reply

    Thanks! Regarding your question: ABAP CDS views. HANA CDS views are not intended for analytics. A good point – goes straight into the article.

    Reply

      Hi, Thanks for the blog. Its a nice read. I am looking for SAP docs where it says HANA CDS are not intended for Analytical purpose. I am in need of this formal doc from SAP to submit to my manager for my project.

      Thanks

      Reply

        Thanks, Ibrahim! Unfortunately, it seems like that there is no official SAP documentation that explicitly says that SAP HANA CDS views are not analytically intended. But even better than an official documentation are facts: neither in SAP S/4 nor SAP EWM (Extended Warehouse Management) is analytical content delivered with SAP HANA CDS views.

        Reply

Hi,

Can we use ABAP CDS to read data in live mode to 3rd party BI tool (Tableau) if we have SAP HANA, RT ed Applic & BW-new/subsq license?

Reply
Sampath Reddy Challabatla
November 18, 2019 11:55

The new programming model’s core idea is to push the logic from the application server to the client-side and the database.

What does it mean Client-side, could you please explain with an example. Thank you

Reply

    Client-side means in this context SAP UI5. For example, a CDS view and its OData service can control via annotations the logic of an SAP UI5 Smart Chart control. Therefore, logic is pushed to the client-side, which resides in the SAP UI5 Smart Chart control, which previously might have been resided in the application server as ABAP code.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Menu