0% found this document useful (0 votes)
102 views

Getting Started With CDS Views

This document discusses CDS views in SAP, including: - There are three types of views: basic, composite, and consumption views. Basic views access physical tables, composite views link basic views, and consumption views allow specific queries. - Features of CDS include SQL functionality, associations between tables/views, annotations for metadata, and extensibility and security using ABAP. - Views are developed in Eclipse using the ABAP Development Tools plugin, which allows connecting to multiple systems and recovers sessions on logout. Views are created by selecting a template and transport.

Uploaded by

kks
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

Getting Started With CDS Views

This document discusses CDS views in SAP, including: - There are three types of views: basic, composite, and consumption views. Basic views access physical tables, composite views link basic views, and consumption views allow specific queries. - Features of CDS include SQL functionality, associations between tables/views, annotations for metadata, and extensibility and security using ABAP. - Views are developed in Eclipse using the ABAP Development Tools plugin, which allows connecting to multiple systems and recovers sessions on logout. Views are created by selecting a template and transport.

Uploaded by

kks
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Getting started with CDS Views

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 :

 Basic : these are used to bring data directly from the physical tables in the
database.
 Composite : this type of view is used to link basic views together through
associations (like SQL joins between views). They are then used by the
consumption views.
 Consumption : these views allow you to create a specific query from a
“composite” view. This is the only type of view that can be exposed to the OData
or transient service to be consumed for reporting.

The features added in the extended SQL of CDS are :

 SQL features : calculations, aggregations, UNION, joins and GROUP BY.


 Associations : to link several tables and/or views.
 Annotations : allow to define meta-models such as naming, ABAP permissions,
view extensibility.
 Extensibility : a view can be extended by a client application without modifying
it, which makes it reusable and flexible.
 ABAP security : CDS uses ABAP authorization objects and transport layers. In
addition, security can be defined explicitly with annotations.

In all cases, their development goes through Eclipse, through a plugin. This tool is called
ADT (ABAP Development Tools).

ABAP Development Tool (ADT)


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 :

 You can connect to multiple ABAP systems simultaneously.


 You can recover the session when you log out. This reduces their impact.
 Can be developed on both ABAP and non-ABAP platforms.

The ADT looks like this :


 Project Exploration View : This view allows the user to explore the various
ABAP packages and objects from an ABAP connection
 Tree view : this view displays the structure of the object opened in the editing
space. It displays the parameters, projections, joins, etc. in a hierarchical manner.
 Editing space : window where the view is expanded
 Perspectives : a configuration of views and editing spaces. Changing the
perspective changes the layout of these views and editing spaces.
 Objects : open objects in the editing space.
 Toolbars
 Views : screens displaying the functionality of the tool.

Below are the steps to create an ABAP project in Eclipse :

 Menu Window -> Perspective -> Open Perspective -> Other, change the
perspective to ABAP Perspective.
 Create a new ABAP Project in File -> New -> ABAP Project.
 Choose the system on which you want to develop and enter the login and
password.
Once connected, we can create our first “View”.

 To create a view, right-click in the tree, then New -> New Data Definition.
 Choose the transport. The transport in SAP is the tool for transferring objects
from one environment to another.

 Choose the view template you wish to create.


 Votre vue est créée.

Analysis of the DDL of a view

CDS Views are defined in a source DDL and at activation time it generates two objects :

 SQL View : this is an invisible object in the ABAP dictionary that cannot be
modified.
 CDS View

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.

You might also like