0% found this document useful (0 votes)
276 views18 pages

2019 ABAP For HANA KT Session

ABAP Core Data Services (CDS) is a framework that defines reusable data models in ABAP programs called CDS views that provide access to data on the database instead of the application server. This allows code-to-data access directly on the database where the data resides. CDS views can include aggregation, conditional logic, input parameters, unions, joins and associations to model data in different ways and take advantage of database capabilities like in-memory processing. Annotations can be used in CDS views to define behaviors for frameworks that evaluate the annotations.

Uploaded by

hanumana_dasa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
276 views18 pages

2019 ABAP For HANA KT Session

ABAP Core Data Services (CDS) is a framework that defines reusable data models in ABAP programs called CDS views that provide access to data on the database instead of the application server. This allows code-to-data access directly on the database where the data resides. CDS views can include aggregation, conditional logic, input parameters, unions, joins and associations to model data in different ways and take advantage of database capabilities like in-memory processing. Annotations can be used in CDS views to define behaviors for frameworks that evaluate the annotations.

Uploaded by

hanumana_dasa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

ABAP Core Data Services

A primer
ABAP Core Data Services

CDS is a framework for defining and consuming semantically rich, reusable data

models on the database instead of the ABAP server, regardless of the database

platform, enabling a common programming model that can take advantage of

innovations such as in-memory processing. These data models are defined in

ABAP programs as CDS views, which provide access to the data in the data

model.
The Intent is to be able to model data in various ways to promote Code-2-data on

the database(where the data resides) rather than on the app server.
Some more ABAP Core Data Services
1. Create a simple view - ZDDLS_CDS_00
2. Consume in a ABAP program - ZHJ_CDS_00_CONSUMPTION
3. Create a new CDS simple view, use it in ABAP and look up
the values in the data preview, also view it in the ABAP
dictionary
Some more ABAP Core Data Services
1. Aggregation within CDS Views
2. Conditional Logic inside views
3. Simple View
4. View on a View
5. View Extensions
Some more ABAP Core Data Services
1. Provide input parameters to provide context based selects
2. Demonstrate ZDDLS_CDS_14A_INPUT_PARAMETERS
3. Demonstrate ZDDLS_CDS_14B_CONSUMPTION
4. Demonstrate how to consume in ABAP ZHJ_CDS_01_CONSUMPTION_VWP
5. Union Clause ZDDLS_CDS_20_UNION
6. Joins both Inner and Outer in one go ZDDLS_CDS_21_JOIN
Some more ABAP Core Data Services
1. Associations in CDS Views – Replacing joins with simple path expressions
2. Normal JOIN - ZDDLS_CDS_21_JOIN
3. Replace with a simple Association ZDDLS_CDS_30_ASSOC_SIMPLE
4. Exposing Associations - ZDDLS_CDS_31A_ASSOC_TYPES
5. Consuming Associations - ZDDLS_CDS_31B_ASSOC_TYPES
ABAP CDS Table Functions

ABAP CDS table functions define table functions that are implemented natively on the
database and can be called in CDS. As such, they support the HANA platform code
pushdown capabilities in ABAP CDS.
ABAP CDS Table Functions
ABAP CDS Table Functions

 Create a demo CDS Table function


Annotations

 From the compiler’s point of view, annotations are simply something that can be
written at given positions and have to follow a prescribed syntax.
ABAP Annotations
 Before ABAP 7.50, only a handful annotations played a role. Those were the
annotations that are evaluated during activation and by the ABAP runtime
environment. We call those annotations ABAP annotations. 

 An important example is@ClientDependent, that defines the client handling when Open
SQL is used to access a CDS entity. Other examples are the EndUserText annotations
that denote translatable texts.
Annotations with ABAP 7.50
 The usage of annotations is not restricted to the ABAP Dictionary’s own needs and the
ABAP runtime environment (e.g.. Open SQL)

 ABAP 7.50 onwards, Software components of SAP such as ODATA, UI, and Analytics
prescribe sets of annotations that can be used to achieve a defined behaviour and the
frameworks themselves provide frameworks that evaluate these framework specific
annotations and act accordingly.
CDS Example with Annotations
 https://sapyard.com/abap-on-sap-hana-part-xv-expose-cds-views-as-odata-service-
through-annotation/
Useful links

1. SAP HANA ABAP: CDS/AMDP – The Real Picture

2. ABAP Core Data Services

3. Annotations in ABAP CDS

4. All annotations

5. Expose CDS View as an OData Service

You might also like