What is the CDS View

What is the CDS view?

To take advantage of SAP HANA for application development, SAP introduced a new data modeling infrastructure known as core data services.
CDS is an enhancement of SQL which provides a Data Definition Language (DDL) for defining semantically rich database tables/views (CDS entities) and user-defined types in the database. Some of the enhancements are:

  • Expressions used for calculations and queries in the data model.
  • Associations on a conceptual level, replacing joins with simple path expressions in queries.
  • Annotations to enrich the data models with additional (domain-specific) metadata.


---

Explain CDS-related Repository Objects?

Data Definition :

Also referred to as DDL Source (for Data De?nition Language, named after the DDL part of SQL).

Contains the definition of either a CDS View or a CDS Table function.

Display only in ABAP workbench.

Editing requires the use of the ABAP Development Tool (ADT in Eclipse).

Access Control :

Also referred to as DCL Source (for Data Control Language, named after the DCL part of SQL).

Contains the de?nition of authorization rules that are automatically checked when a program accesses a certain CDS View or CDS table function.

Display only in ABAP workbench.

Editing requires the use of the ABAP Development Tool (ADT in Eclipse).
 

---

What are the advantages of using CDS views? 

CDS Views offer several benefits, including:

  • Improved performance: CDS Views are optimized for SAP HANA, so they provide fast data access and processing.
  • Reusability: CDS Views can be reused across different applications, reducing the need for redundant code and data models.
  • Simplified data modeling: CDS Views provide a simplified and standardized way to define data models, making it easier to develop and maintain applications.
  • Integration with other SAP technologies: CDS Views can be integrated with other SAP technologies, such as SAP Fiori and SAP BW, to provide a seamless user experience.
---

How do you define a CDS View in SAP?

A CDS View is defined using a DDL (Data Definition Language) statement in the ABAP Development Tools (ADT) or SAP HANA Studio. The statement defines the view name, data fields, and other attributes, such as filtering and sorting criteria.

---

What is a CDS extension?

CDS extensions are used to enhance existing CDS views by adding additional fields or annotations. They allow developers to modify the behavior of CDS views without having to create a new view from scratch.

---

How CDS view and SQL view are related?

A CDS View is defined in a DDL Source, which is a new type of repository object.

Upon activation of a DDL Source, two objects are created: the SQL View and the CDS View.

The SQL View is visible as an object in the ABAP Dictionary where it cannot be edited and only reveals a fraction of the information available in the DDL source. It serves as a representative of the database object.

The CDS View carries more semantics than its SQL view. It is not created on the Database and it is not visible in the ABAP Dictionary. It can, however, be consumed via open SQL.
 

ABAP Tips

 

See Also
SAP ABAP on HANA

Estimate Guidelines for ABAP programs

Get help for your ABAP problems
Do you have a ABAP Question?

ABAP Books
ABAP Certification, BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference Books

More ABAP Tips

Main Index
SAP Basis, ABAP Programming and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.