SAP ABAP CDS Views vs. SAP HANA CDS Views (+ Illustrations)

Photo of author
By INUI
| Published on

SAP ABAP CDS views and SAP HANA CDS views are not the same, but the’re similar.

They’re two different ways of looking at the same thing.

Both are based on the same specs, but they have different goals.

Let’s get started!

What Are SAP CDS Views?

SAP CDS (Core Data Services) 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.

CDS views are part of pushing logic to the database and 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.

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 SAP ABAP (Advances Business Application Programming) 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.

Furthermore, CDS views push the logic to the client-side, because they can control SAPUI5 Smart Controls and SAP Fiori Elements by annotations through OData services that can be generated from a CDS view.

Therefore, the logic is also delegated to the client-side, since SAP CDS views have the ability to delegate certain SAPUI5 controls.

The SAP CDS views are similar to ABAP dictionary views in that they are pre-defined SQL queries for one or more database tables.

This allows for effective and comfortable data access.

Nevertheless, ABAP CDS views do a lot more than ABAP dictionary views, since ABAP structures are just ABAP structures.

An ABAP CDS view generates an ABAP structure and more.

An ABAP CDS view generates or can generate:

  • ABAP structures
  • Database structures
  • Open SQL structures
  • OData Services

Until CDS views, ABAP code held the logic of an ABAP application and it was processed by an application server.

Now large parts of ABAP code can be outsourced to CDS views, and therefore from the application server to the database.

However, that’s what SAP ABAP CDS views and SAP HANA (High-Performance Analytic Appliance) CDS views have in common.

Now, the differences between ABAP CDS views and HANA CDS views:

What Are SAP ABAP CDS Views?

SAP ABAP CDS views are defined at the application server level.

The views are created and maintained in DDL (Data Definition Language) files on the ABAP application server.

They’re in the ABAP data dictionary (SE11) and are part of the transport system, life cycle management, and so on.

The views use Open SQL. They aim to support ABAP application development.

The type of database system doesn’t matter—it doesn’t have to be SAP HANA.

The main focus of ABAP CDS views is to create views.

Below the features of ABAP CDS views:

  • Reside in the application server
  • Work with any database
  • Use Open SQL
  • Aim at ABAP applications
  • Main focus to create views

Below is the typical 3-tier architecture of an SAP system—ABAP CDS views reside on the application server in the ABAP data dictionary, but the logic is kept in the database:

SAP ABAP CDS views reside in the application server in the Data Dictionary but processing the logic in the database.

See here for SAP ABAP CDS views best practices.

What Are SAP HANA CDS Views?

SAP HANA CDS views are defined at SAP HANA database level.

Views are created and maintained in DDL files stored in the SAP HANA XS (HANA Extended Application Services) database.

The views use Native SQL.

HANA CDS views aim to support the development of native SAP HANA applications. They use features that are unique to SAP HANA. They can only be used with a HANA database.

The main focus of HANA CDS views is to create models directly in the database.

Below the features of HANA CDS views:

  • Reside in the HANA database (HANA XS/XSA)
  • Work only with a HANA database
  • Use Native SQL
  • Aim at native HANA applications
  • Main focus to create models

See below the SAP HANA XS 2-tier architecture in which HANA CDS views reside:

SAP HANA XS 2-tier architecture.

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 isn’t guaranteed:

  • They run on different platforms: ABAP CDS views reside in the ABAP application server (SAP R/3, SAP ECC or SAP S/4HANA), 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 HANA applications.

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

If you’re looking for live ABAP CDS views, here are 3 ways to find SAP ABAP CDS views demos and examples in your SAP system (at least ABAP 7.40 SP05).

5 Key Differences Between SAP ABAP CDS Views and SAP HANA CDS Views

Below are the main differences between SAP ABAP CDS views and SAP HANA CDS views:

SAP ABAP CDS views vs. SAP HANA CDS views comparision table.

2 thoughts on “SAP ABAP CDS Views vs. SAP HANA CDS Views (+ Illustrations)”

Leave a Comment