- Choose the transport. The transport in SAP is the tool for transferring objects from one environment to another.
With the arrival of S/4HANA, SAP has introduced a change, with regard to the development of business layers from ERP tables. The aim is to be as close as possible to the database in order to get the best performance.
The introduction of CDS (Core Data Services) Views is an improvement on the ABAP (Data Dictionary) layer. They provide a more advanced and semantically rich data model.
Thanks to CDS Views one can expose, model, link, aggregate, … the data present in the database, and thus make it more easily accessible.
Technically, CDS is a collection of SAP-specific languages. It is an extension of SQL and at the same time a data definition language (DDL), a data manipulation language (DML) and an authorization control language (DCL). With this, we can create a virtual data model called VDM (Virtual Data Model).
There are three types of views :
The features added in the extended SQL of CDS are :
In all cases, their development goes through Eclipse, through a plugin. This tool is called ADT (ABAP Development Tools).
Stay up to date with our latest blog posts, upcoming webinars and news!
It is a development tool based on Eclipse, which allows you to use the power and flexibility of this tool. It has the following features :
The ADT looks like this :
Below are the steps to create an ABAP project in Eclipse :
Once connected, we can create our first “View”.
CDS Views are defined in a source DDL and at activation time it generates two objects :
The simplest form of CDS View is the projection, i.e. a selection of fields from a single table. The name of a view specified in @ABAPCatalog.sqlViewName must be different from the name of the CDS entity and their names cannot exceed sixteen characters.
As presented earlier, CDS views have extensive SQL functionality (calculations, GROUP BY…) but also the possibility to add associations, annotations and extensibility.
The views with aggregations include the traditional functions such as MIN, MAX, SUM, AVG, COUNT and COUNT (DISTINCT). They can be used in the selection list or the HAVING.
The two result sets of a DDL are merged. Any duplicate rows between the two tables are removed from the final result.
Associations are used to link the different views. They give semantic information about the relationships between tables, such as cardinalities. They have a particular syntax but the SQL generated is in the form of classic joins.
Sometimes users need to enter parameters to influence the results according to business needs. This is the case, for example, if the user wants to filter the results on a language, or if they want to modify the results of a calculation by entering the percentage of a discount coupon. They are defined through the WITH PARAMETERS clause. When the view is executed, the user will be asked for these parameters.
CDS Views add a semantic layer to SAP data that makes it more meaningful to business users. From this, users will be able to build operational datasets and create dashboards with real time data directly from the ERP with third party tools.
In addition, the features provided in CDS Views allow the construction of complex views involving several tables or other views. It is therefore possible to create semantically rich views that are as faithful as possible to business requirements and encapsulate all business rules.
Thanks to their integration in the ABAP layer, very useful functionalities such as security recovery allow to build a reliable and secure model.
However, building these views requires CDS development skills. SAP opted for the flexibility and ease of use of Eclipse to make the development of these views as smooth as possible.
Thanks to Steven VERBRAEKEN for his help in writing this article