A new generation of CDS views: CDS view entities (2024)

With ABAP release 7.55, a new type of CDS view is available: in official terminology, it's called CDS view entity. And it has come to replace the "classic" CDS DDIC-based views that have been around for years.

A new generation of CDS views: CDS view entities (1)


This blog post provides the following information:

  1. Motivation: why has SAP developed a new type of CDS view?
  2. Key differences between DDIC-based views and CDS view entities
  3. Outlook: transition from DDIC-based views to CDS view entities

Motivation: why has SAP developed a new type of CDS view?

A CDS DDIC-based view is defined using the statement DEFINE VIEW. This kind of CDS view was first released with release 7.40, SP05 and it was for many years the only available kind of CDS view.
Since release 7.55, CDS view entities are available. They are defined using the statement DEFINE VIEW ENTITY. They have evolved from CDS DDIC-based views, serve the same purpose and have the same structure as their predecessor. But they offer several advantages over the "classic" CDS DDIC-based views, such as the following:

  • No additional ABAP Dictionary view is created on activation.
  • Improved performance during view activation.
  • Optimization and simplification of syntax.
  • Stricter syntax checks indicate problematic situations more explicitly, for example, annotation checks.

Key differences between DDIC-based views and CDS view entities

CDS view entities are a new and improved version of CDS DDIC-based views. Although very similar, CDS view entities are easier to use, and offer many small improvements and enhanced features.
Here are some principal ways in which CDS view entities differ from CDS DDIC-based views:

  • There’s no DDIC view. The annotation @AbapCatalog.sqlViewName is not required and each view has only one name.

Please note that the name of the annotation is a bit misleading. Of course, a view entity has an SQL view on the database, but now the intermediate DDIC view is not needed any more.

  • Fewer annotations are required. For example, client handling takes place implicitly and doesn't require any development effort.
  • Overhauled buffer handling by means of CDS tuning objects offers more flexibility (see Buffering CDS View Entities | SAP Blogs for further details).
  • Overhauled extension concept with CDS view entity extends (EXTEND VIEW ENTITY) offers much faster activation performance, see ABAP Core Data Services: New syntax for extending CDS entities | SAP Blogs for further details.
  • Annotations are checked to ensure that only annotations defined as CDS objects in a CDS annotation definition can be used.
  • Expressions can be nested within each other. Situations that previously required a view stack can now be implemented within a single view.
  • Operand positions, such as the WHERE-clause, allow a greater variety of operands.
  • Some features that haven't been widely used are no longer supported in view entities. Here are some examples (but the list is not exhaustive):
    • In DDIC-based views it is possible to assign alternative element names to elements of a SELECT-list using a name list. CDS view entities don't support name lists.
    • The syntax SELECT * to select all elements from the data source is supported in CDS DDIC-based views, but not in CDS view entities.
    • Domain fixed values in front of literals cannot be defined in CDS view entities.

Additional features, such as typed literals to enhance type safety, and optimized buffer handling, are planned for future releases.
The following example compares a CDS DDIC-based view with a CDS view entity:

CDS DDIC-based viewCDS view entity

@AbapCatalog.sqlViewName: 'DEMO_CDS_JOIN'@AbapCatalog.compiler.compareFilter: true@ClientHandling.algorithm: #SESSION_VARIABLE@AbapCatalog.preserveKey: true@AccessControl.authorizationCheck: #NOT_ALLOWED define view demo_cds_scarr_spfli as select from spfli join scarr on scarr.carrid = spfli.carrid{ key spfli.carrid as id, key scarr.carrname as carrier, key spfli.connid as flight, spfli.cityfrom as departure, spfli.cityto as destination}

....@AccessControl.authorizationCheck: #NOT_ALLOWEDdefine view entity demo_cds_scarr_spfli_2as select from spfli join scarr on scarr.carrid = spfli.carrid { key spfli.carrid as id, key scarr.carrname as carrier, key spfli.connid as flight, spfli.cityfrom as departure, spfli.cityto as destination }

Differences:

  • The view entity doesn't require the annotation @AbapCatalog.sqlViewName.
  • The view entity doesn't require the annotation @AbapCatalog.compiler.compareFilter: true,because the filter is implicitly and automatically compared.
  • The view entity doesn't require the annotation @ClientHandling.algorithm, since client handling takes place implicitly.
  • The view entity doesn't require the annotation @AbapCatalog.preserveKey: true, because there's no ABAP Dictionary view attached to a CDS view entity.
  • The view entity is defined using the statement DEFINE VIEW ENTITY.

For a comprehensive description of CDS view entities, refer to ABAP Keyword Documentation (F1 Help in SAP GUI and ADT).

Outlook: transition from CDS DDIC-based views to CDS view entities

Since ABAP Release 7.56, ABAP Platform 2021, it is possible to migrate existing DDIC-based views to CDS view entities. Details are described in the following blog post: A new generation of CDS views: how to migrate your CDS views to CDS view entities. Migration is voluntary and can be done to benefit from the enhanced functionality of CDS view entities. "Classic" CDS DDIC-based views are supported, but not further developed. For new development scenarios, it is recommended to create only CDS view entities.
Info: SAP will continue to support classic CDS DDIC-based views. CDS DDIC-based views will not be retired, and customers will not be forced to use CDS view entities. SAP protects investments.

A new generation of CDS views: CDS view entities (2)

Update May 2022: Since ABAP release 7.88, CDS view entities are feature complete. An overview of all new features, improvements, and differences is provided in the blog series CDS view entities are feature complete. Overview of new features, improvements, and differences | SA....

Further information:

A new generation of CDS views: CDS view entities (2024)

References

Top Articles
Agave's profile on bar lists is growing. 5 home recipes for traditional co*cktails that sub it in
Peppermint Espresso Martini Recipe: Create a Superb co*cktail for Any Occasion - La Silhouette
Why Are Fuel Leaks A Problem Aceable
Public Opinion Obituaries Chambersburg Pa
Minooka Channahon Patch
Angela Babicz Leak
Jazmen Jafar Linkedin
Citibank Branch Locations In Orlando Florida
Lamb Funeral Home Obituaries Columbus Ga
Jailbase Orlando
Women's Beauty Parlour Near Me
Tyrunt
Computer Repair Tryon North Carolina
30% OFF Jellycat Promo Code - September 2024 (*NEW*)
Athletic Squad With Poles Crossword
What is IXL and How Does it Work?
Culos Grandes Ricos
Busted Newspaper S Randolph County Dirt The Press As Pawns
“In my day, you were butch or you were femme”
Accuradio Unblocked
2015 Honda Fit EX-L for sale - Seattle, WA - craigslist
Byte Delta Dental
Unlv Mid Semester Classes
Gem City Surgeons Miami Valley South
How Much Is Tay Ks Bail
Where to Find Scavs in Customs in Escape from Tarkov
China’s UberEats - Meituan Dianping, Abandons Bike Sharing And Ride Hailing - Digital Crew
Contracts for May 28, 2020
Reborn Rich Kissasian
Dragonvale Valor Dragon
What Equals 16
Inter Miami Vs Fc Dallas Total Sportek
10 Best Places to Go and Things to Know for a Trip to the Hickory M...
Evil Dead Rise Ending Explained
Imagetrend Elite Delaware
Account Now Login In
60 Second Burger Run Unblocked
Rust Belt Revival Auctions
The Wichita Beacon from Wichita, Kansas
Newcardapply Com 21961
AI-Powered Free Online Flashcards for Studying | Kahoot!
Überblick zum Barotrauma - Überblick zum Barotrauma - MSD Manual Profi-Ausgabe
Anguilla Forum Tripadvisor
The All-New MyUMobile App - Support | U Mobile
Silive Obituary
Lonely Wife Dating Club בקורות וחוות דעת משתמשים 2021
Deepwoken: How To Unlock All Fighting Styles Guide - Item Level Gaming
Levi Ackerman Tattoo Ideas
John M. Oakey & Son Funeral Home And Crematory Obituaries
Sechrest Davis Funeral Home High Point Nc
All Weapon Perks and Status Effects - Conan Exiles | Game...
My Eschedule Greatpeople Me
Latest Posts
Article information

Author: Neely Ledner

Last Updated:

Views: 6640

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Neely Ledner

Birthday: 1998-06-09

Address: 443 Barrows Terrace, New Jodyberg, CO 57462-5329

Phone: +2433516856029

Job: Central Legal Facilitator

Hobby: Backpacking, Jogging, Magic, Driving, Macrame, Embroidery, Foraging

Introduction: My name is Neely Ledner, I am a bright, determined, beautiful, adventurous, adventurous, spotless, calm person who loves writing and wants to share my knowledge and understanding with you.