Custom CDS Views – What’s New in 2108
The upgrade to 2108 has started just yesterday, so I’m a little late already to inform you about the changes that are coming with this release. On the other hand, there are not too many visible changes that made it to 2108, as the major topic we started is spanning across the next releases. The good news about this is, that we can keep it short for today:
[TLDR] With 2108, you will be able to choose from a wider variety of data sources to build custom CDS views. Apart from that, your CDS views will become more future ready and more stable by replacing outdated element properties.
[UPDATE from August, 9th] One more thing (that I almost forgot to mention) is, that we improved the personalisation option of the overview page (worklist) as well. It now includes not only the filter definition, but also the layout and sort options of the table!
[ONPREM] A short remark for the users of the on premise version of the Custom CDS Views app: For you, the changes to the last version (SAP S/4HANA 2020 to 2021) consist of the cloud versions 2011, 2102, 2105 and 2108.
Still want to know more details? Here they are:
CDS View Entities
You may have heard that SAP is currently introducing a new paradigm, how (ABAP) CDS Views are persisted. This paradigm is called “view entities”.
If you are interested, I have two reading recommendations for you. The first one is kind of the management summary to it, whereas the second one gives some more technical details:
The key takeaway is, that this new type of views can be activated more quickly, activation of them does check a lot more details upfront and they provide additional language features and functions.
As the Custom CDS Views app uses CDS views as data sources and also creates CDS views, we have to deal with this evolution in several ways. The first one is to keep this implementation detail away from the Custom CDS Views app. As a key user, you should not be bothered with this. You shall of course profit from the new benefits, but apart from that shall be able to work with our app as before without any drawbacks or additional complexity. And that’s exactly what we are working on right now.
View Entities as Data Sources
Of course, SAP does also make use of this new view generation. Most of the new VDM views, that will be added to the VDM data model, will be view entities. Even existing VDM views might be updated to view entities. So the first step for us was, to allow using these new CDS view entities as data sources (on top of the regular “old” CDS views that you can of course still use as well) in the Custom CDS Views app.
For you as a user of our app, the simple impact is, that you will now be able to make use of additional VDM data sources, that you could not use before. Enjoy 😉
Label Element is now Text Element
The element properties changed as well a bit. The element property “Label Element” was replaced with the new property “Text Element”.
This change is caused by changes to the underlying annotations. The annotation @Consumption.labelElement should not be used any more and was replaced with the more modern @ObjectModel.text.element. For the curious, there is a developer documentation available.
Again we stick to our principle to keep such technical details away from the key user. We will take care that the change happens under the hood, when publishing a CDS view again. Even if you don’t do that, the views will continue to work.
Changed Aggregation Behaviour
Especially in the analytical scenarios, you may have experienced the problem, that it was sometimes a bit tricky to select the right aggregation behaviour (in case it was not inherited from the base views). With 2108, we simplified it for you. Before, you always had to select a specific aggregation and even if you removed the aggregation in the selection, we set it to NONE which has its own semantics in analytics and is sometimes even not allowed (depending on the data type of your field).
With 2108, an empty aggregation behaviour in the Element Properties will leave it up to the analytical engine, which behaviour to choose and therefore ensures maximum compatibility as it will work out of the box in all cases.
Updated Personalisation Options
Sure, this is not a major functionality of the app, nevertheless, I like it a lot. If you (like me) have personalised your work-list (e.g. with a filter that only shows the custom CDS views, that you created), you can now include your favourite sort options and your favourite fields with that as well. I have personalised mine in a way, that I always see my views ordered by the last changed date. Therefore I also removed the “changed by” and some other fields from my personal work-list variant.
You guessed it already: The topic with the view entities is not over yet. On top of being able to use additional data sources, we also want you to profit from the benefits of view entities with your own custom CDS views as well. That’s what we are up to in the next releases: Make your Custom CDS views future ready by seamlessly persisting them as view entities. As view entities are slightly different, as we learned before, this will happen in several stages to ensure continuity & stability.
Until then, stay tuned, stay healthy & have a nice summer vacation!