Understanding the Concept of CDS View in SAP HANA

What Is Cds View In Sap Hana

CDS View in SAP HANA is a powerful feature that allows users to define and consume semantically rich data models within the database. It provides a way to create virtual tables or views, which can be used for reporting and analysis purposes. With CDS Views, developers can easily access and manipulate data from multiple tables or views using SQL-like syntax. This article explores the concept of CDS Views in SAP HANA and highlights its benefits and applications in enterprise environments.

Introduction

Data models play a crucial role in application development as they establish a uniform approach to defining and organizing database information. This allows various applications to access and utilize the same data, resulting in cost-effective development, faster product release, and enhanced overall efficiency and effectiveness.

Individuals who have experience in ABAP application development are likely familiar with the conventional data modeling tools that come with SAP NetWeaver Application Server (SAP NetWeaver AS) ABAP. These tools, such as the ABAP data dictionary (DDIC), enable users to define objects like database tables and views for use in ABAP programs. However, the introduction of SAP HANA brought about a shift in approach, emphasizing the execution of data-intensive logic at the database level.

The idea of the Virtual Data Model (VDM) was introduced through HANA Live a few years back. HANA Live is essentially a virtual data model that sits on top of suite tables and utilizes native SAP HANA SQL views known as Calculation views for real-time operational reporting.

There were several challenges associated with this: Firstly, the support for hierarchies was not adequate. Hierarchies are important for businesses as they allow data analysis in a tree-like structure with the ability to drill down through different levels. For example, a time hierarchy may include fiscal year, fiscal quarter, fiscal month, and so on.

Secondly, high-quality data models should offer a single definition and format for the data. They need to be clear and unambiguous while also being reusable and flexible enough to accommodate future changes.

You might be interested:  SAP Tcode for Chart of Accounts

Lastly, since HANA Live virtual data models were defined in the HANA database layer, it resulted in duplication of security roles between Business Suite (used for transactional processing) and HANA database (used for operational reporting).

Now, there are a few queries that arise:

1. How can you effectively represent the meaning of the data structure in the database to facilitate its reuse by various users such as OData clients and OLAP tools?

3. Is it really impossible?

Perhaps, in the absence of Core Data Services (CDS)..

“Core Data Services to build design-time data-persistence models”

CDS View in SAP HANA is a framework that enables database developers to build the foundational structure for storing and managing data.

CDS simplifies and standardizes the process of defining and utilizing data models, regardless of the technology used. It is a SQL enhancement that offers a data definition language (DDL) for creating database tables/views (known as CDS entities) and user-defined types with rich semantic information. Some improvements include expressions for calculations and queries, associations to replace joins in queries, and annotations to enhance data models with additional metadata specific to various domains.

CDS is inherently supported in both the ABAP and HANA platforms.

In my view, CDS is the most ambitious and thrilling advancement by SAP in data modeling. It allows you to define and use your data models consistently across different SAP technology platforms, be it ABAP or HANA. The phrase “One Data Model to rule them all” often comes to mind when I think about CDS.

In addition to an informative blog by horst.keller, there is a description of the two variations of CDS.

After going through the above blog, we came to know that CDS can be written in two different flavours and uses the ” Code Pushdown ” techniques introduced with NW AS ABAP 7.4 SP5 where SAP added new possibility for ABAP developers to leverage HANA capabilities. In code pushdown technique all calculations are performed on database layer instead of application layer, which results in fast retrieval of data, resulting cutback of application execution.

Architecture overview

The CDS architecture consists of three layers: the database layer, the application layer, and the presentation layer. The database layer can be configured with various popular databases such as Oracle or SAP HANA, although it is recommended to use SAP HANA for optimal performance. The application layer includes AS ABAP Backend and SAP Gateway, which are integrated through RFC calls. Lastly, the presentation layer utilizes SAP Fiori User Interface to provide a user-friendly interface for end users.

You might be interested:  Understanding Info Object in SAP BW

Understanding CDS Releases in SAP HANA

Below is an overview of changes in CDS functionalities with the ABAP specific releases.

To find more information, refer to the Feature Matrix. The table below outlines the changes made with specific ABAP releases:

1. In ABAP 7.40, SP05, CDS views were introduced.

2. In ABAP 7.40, SP08, several enhancements were made to CDS views including annotations, parameters support, view enhancements, expressions and functions usage, join types for associations, path expression with filter conditions capability and checking literals against fixed domain values.

CDS table functions, session variables, CDS views with input parameters, annotations for input parameters, key fields, evaluation of annotations, publishing associations, and extensions are some important aspects related to CDS views in SAP HANA.

Client management
Merging of data from multiple tables

.

What Is CDS View in SAP HANA: An Overview

The Core Data services are supported in various SAP platforms, including SAP NetWeaver 7.50 or higher, SAP NetWeaver 7.4 SP05, SAP HANA SPS6, Suite on HANA (SAP Business Suite EHP7), S/4HANA, and SAP Business Warehouse 7.3.

What Drives Core Data Services in SAP HANA?

1. CDS views in SAP HANA are semantically rich data models that closely resemble conceptual thinking and use domain-specific languages for declarative programming.

2. CDS is built on SQL, allowing users to utilize standard SQL features like joins and built-in functions.

3. These views are fully compatible with any database as they are generated into managed Open SQL views integrated into the SAP HANA layer.

4. Annotations are supported in CDS syntax, enabling easy evaluation by other components such as UI, analytics, and OData services.

6. CDS views can be extended by adding fields automatically along with their usage hierarchy at both the model level through extensions and meta-model level through annotations.

You might be interested:  A Step-by-Step Guide on Scheduling Background Jobs in SAP

CDS views and their information can be expanded and seamlessly integrated into the ABAP Data Dictionary and the ABAP language.

In order to maintain the main focus of this blog, I have made an effort to keep it concise and brief.

Follow:-

1. ABAP Core Data Services – Part 1 (ABAP CDS Entities) focuses on the entities within ABAP Core Data Services.

2. In ABAP Core Data Services – Part 2, we explore the different types of CDS views available.

3. Discover the various Virtual Data Model Types in ABAP Core Data Services – Part 3.

Credits:-

The big advantage of CDS views is that they provide a unified data model for multiple applications. They can be used as data sources for different SAP applications such as SAP Fiori, S/4 HANA Embebbed Analytics, BW/4 HANA and others, as well as for third party applications such as PowerBI.

Understanding CDS in SAP s4 HANA

1. CDS views are used to define and consume semantically rich data models.

2. They provide a unified way of defining database tables and their relationships.

3. CDS views support both analytical and transactional scenarios.

5. These virtual models can be exposed as reusable entities for reporting or application development purposes.

6. CDS views offer advanced features like aggregations, filtering conditions, joins, and calculations directly within the view definition itself.

8. By using annotations within the view definition, developers can enhance metadata information for better integration with other tools and applications.

Overall, CDS views play a crucial role in simplifying data modeling and enhancing performance in SAP HANA-based systems like S/4HANA.

SAP: The meaning of CDS

Core Data Services (CDS) is a crucial component of the SAP Cloud Application Programming Model (CAP). It serves as the foundation for capturing service definitions, data models, queries, and expressions in a declarative manner. CDS utilizes plain object notations written in JavaScript to achieve this.

Another important feature provided by CDS is its integration with other SAP technologies such as ABAP Dictionary and SQLScript. This integration allows for seamless access to existing database structures and functions while providing enhanced capabilities like advanced filtering options and calculation views.