To improve the support of code pushdown and the integration of the necessary database objects into the ABAP development process, SAP has enhanced the functional scope of Open SQL and ABAP database views even further since SAP NetWeaver AS ABAP 7.4 SP 5. In this chapter, we’ll introduce the new features.

6Advanced Database Programming with ABAP 7.4

To use the code-to-data paradigm in ABAP applications, you require the corresponding means to implement and execute the processing logic in the database. Chapter 5, Section 5.1.2 and Section 5.2.2, described how you can use SAP HANA development objects for this purpose. However, you might have noticed that using these objects can also lead to problems.

In contrast to objects that are completely managed by AS ABAP, the following restrictions apply to the development of SAP HANA development objects and the usage of the corresponding replacement objects in ABAP (external view and database procedure proxies):

This chapter introduces the new database programming and code pushdown options in ABAP. ABAP manages the resulting objects to ensure a familiar integration of the objects into ABAP Lifecycle Management, including version management and object extensibility. We’ll discuss the following enhancements, which have been developed since ABAP 7.4 SP 5:

6.1Introducing Core Data Services

Core Data Services (CDS) are a specific SAP method of defining persistent data models. The specification is based on the SQL-92 and SQL:1999 standards. Just like SQL, CDS define a data definition language (DDL) and a data control language (DCL). They also define a query language (QL). You can use the DDL, for example, to describe database tables and structured types. The QL allows you to read data in a comfortable way and is used in combination with DDL to define database views. The DCL enables you to define access restrictions for CDS objects.

CDS additionally contain the following SQL enhancements that are necessary to create optimal data models for business applications:

The CDS specification is implemented in SAP NetWeaver AS ABAP and in SAP HANA. These implementations were made mainly independently of each other. Although the CDS implementation in AS ABAP (also referred to as ABAP CDS) leverages the infrastructure of the ABAP AS with mainly database-independent ABAP CDS objects, the CDS implementation in SAP HANA (also referred to as SAP HANA CDS) is fully bound by the conditions of the SAP HANA database. So currently, you can’t use SAP HANA CDS objects in AS ABAP or ABAP CDS objects in SAP HANA.

Despite the different implementations, you can benefit from the shared specification: CDS describes a uniform and—due to the enhancements—expressive syntax for data modeling. If you are familiar with this syntax, you’ll easily understand the models irrespective of where they are implemented. CDS also harmonize further data modeling aspects. For example, CDS define how you can enhance data models. This enables SAP customers and partners to adapt existing ABAP or SAP HANA CDS objects to their requirements in the same way. Finally, because CDS are based on the SQL-92 and SQL:1999 standards, many functions already familiar to you from SQL are available to implement the code pushdown in your data models.