CDS objects created via SAP HANA studio


Espresso Tutorials

Fabian Bentz

354Excerpt from 
Practical Guide to SAP Core Data Services (CDS) by Deepa Rawat.

CDS is an SQL language that helps define semantically rich data models in SAP HANA. CDS has been defined in great detail in Chapter 1. In this chapter, we will define and talk about the different CDS artifacts, how to use SAP HANA XS to define that artifact, and then use our swim data model to create objects using the CDS concept.

CDS artifacts need to exist within a schema. We can continue to reference the same schema that we defined in the previous chapter via the file with extension *.hdbschema. Similar to non-CDS objects defined in the prior chapter, CDS artifacts are also defined in design-time files. These files contain the definition of the CDS artifacts, and when these files are activated, the runtime objects get created in the SAP HANA catalog. The files created via SAP HANA XS must have the extension .hdbdd. For example, the CDS table samplecdstable would get created in a file that has the name samplecdstable.hdbdd.

We can use CDS to define the following artifacts:
  • Entities (tables)
  • Views
  • User-defined data types (including structured types)
  • Contexts
  • Associations
  • Annotations

In the next few sections, we will define each of these artifacts and then use the swim data model to explain the objects further.

Keeping reading in Practical Guide to SAP Core Data Services (CDS). 

Core Data Services (CDS) is SAP’s method of defining persistent data models in the database layer. CDS is a key piece of the SAP HANA landscape, speeding up data retrieval by pushing database processing to the database engine. This books provides a practical introduction to the SQL-based functionality and methods. Learn how to use SAP HANA Studio to utilize perspectives to create objects in the SAP HANA database, including the SAP HANA development perspective. Use syntax to create non-CDS database artifacts via SAP HANA Studio development perspective using SAP HANA XS Classic. Explore CDS artifacts, how to use SAP HANA XS to define an artifact, and dive into a detailed example of how to create objects using a CDS concept. Learn how to create CDS objects using SAP HANA web-based development workbench, SAP Web IDE for SAP HANA, and SAP HANA Studio ABAP Workbench. Explore two methods to extract data from CDS views using ABAP.

– Get an introduction to CDS and SAP HANA Studio
– Create CDS views and code new structures in ABAP
– Use templates, associations, and annotations
– Explore select clauses and aggregate functions

Deepa

Deepa Rawat is a senior consultant for a global consulting company. For the past 17 years, her main area of focus has been SAP BW and more recently, SAP BW on SAP HANA. She has extensive experience implementing and leading SAP BW projects globally. Currently, Ms. Rawat is an SAP BW team lead and leads a team of more than 15 consultants across different projects. She has a degree in Masters in Information Systems from University of Southampton, UK.