Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
harishbokkasam1
Employee
Employee

What is new?


Key terminology:


Core data services (CDS) are the well-established technology to define a semantic data model that is optimized for fast execution on the underlying SAP HANA database. Since the introduction of CDS many features have been added consecutively that offer rich data modeling capabilities.

Presently, creation of a CDS DDIC-based view (DEFINE VIEW) always generates a CDS-managed DDIC view which is the corresponding SQL database view. This was always very tedious as you must create an additional artefact name using annotation @AbapCatalog.sqlViewName: ‘SQL_DATABASE_VIEW’ and is also quite limited from a namespace perspective. In addition, complex view hierarchies can lead to long activation times and are difficult to maintain. To overcome these limitations a new generation of CDS views have been introduced with version 2008.

You probably would like to know, why new CDS view entities are introduced and what are new features and improvements….


CDS view entity without SQL database view and with some of the new features



Why there are new CDS view entities at all?


With the support of “CDS View Entities” some significant optimizations which were not possible with the existing CDS DDIC-based views are delivered. Those optimizations are the following:

Simplified Definition, Consumption & Management of “View Entities”



  • There will be only ONE name for CDS View Entities (and not three names anymore). This name defines both the CDS Design-Time Object (Transport object: DDLS), the generated CDS Runtime Object (Transport object: STOB) and the SQL View in HANA


CDS view entity without SQL database view and with some of the new features


Important facts



  • There will be two CDS views in parallel (until CDS view entities are fully compatible):





    • CDS View entities will be new version of the CDS DDIC-based views

    • CDS DDIC-based views (to be continued) is the “old” version you were using before





  • The “old” CDS DDIC-based view is still available and can be used without any restrictions. You will find all the views you have created and will be able to work with them

  • In some cases, due to incompatible changes complete migration may not be possible.

  • There will be a possibility to convert your views from the “old” CDS DDIC-based view to the new one in the future.



What are the constraints???



  • You cannot create a new CDS view entity with same name as an existing CDS DDIC-based view

  • You can convert a CDS DDIC-based view to new CDS view entity by using a new name and delete the existing CDS DDIC-based view

  • Currently, you cannot use UNION, case-join in CDS view entity modeling

  • Special case:

    • Explicit JOINs to CDS entities with only client key field would require

    • either a JOIN without an ON clause in the syntax/grammar

    • usage of "always true" predicates (1 = 1) as a workaround





What are the improvements???


New Architecture


Improvements to previous “Design decision” and corresponding implementations


 

Speed & Simplicity


Optimized CDS Activation & performance



  • For CDS “View Entities” no CDS-managed DDIC view will be generated anymore but only the CDS Runtime Object (STOB) and the corresponding SQL View in HANA. Consequently, the activation performance on ABAP-level can be significantly improved as only one object (STOB) needs to be created & activated on DDIC level and not two (STOB, VIEW) as in the past

  • Keys: instead of having 2 sets of key fields have only a single set of key fields

  • The handling of cyclic dependencies could be reworked significantly



What about my existing CDS Views?



  • There will be NO automatic (respectively implicit) conversion of existing CDS DDIC-based Views to "CDS View Entities"!

  • In order to ease the migration from existing CDS DDIC-based view to the new "CDS View Entities”, dedicated migration support is planned

  • But even with this migration support it will be your explicit decision as the owner of a concrete CDS DDIC-based view if you want to migrate to CDS Views Entities

  • In order to ease the conversion/migration of existing CDS DDIC-based view to "CDS View Entities", it will be possible that the "CDS View Entities" and existing CDS DDIC-based views can be arbitrarily nested

  • Now, for view entities analytical query name will be 2C<CDS-Viewname in UpperCase>.

  • As the BW name should not be longer than 30 characters, CDS-view name should be less than 28 characters.


 

What’s next?



  • The “old” CDS DDIC-based views will not be removed even after a conversion report is available

  • General availability of the creation of newCDS View Entities including the support to extend those new CDS View Entities via "CDS View Entity Extends"

  • Allow migration of CDS Views that are registered for "Data Source Extensibility"

  • In future, the migration of "classic" CDS DDIC-based views to CDS View Entities will eased by dedicated migration tooling


In future releases for "CDS View Entities" the following aspects will be optimized:

  • Checks of "Key"-Elements

  • Amount/Quantity Handling

  • Buffer Handling

  • Improved type-safety through type literals



Finally, close remaining functional gaps compared to


"classical" CDS DDIC-based views


 

you are always welcome to leave comments & ask questions right here!

For more technical information and code snippets,

refer to: Technical article-A new generation of CDS views: CDS view entities

Images: The key terminology table -self and the CDS view entities image -Harish Mehta(SAP)
25 Comments