The leaves turn colourful, the wine harvest is almost over here in Germany, and another release of the Custom CDS Views app is about to arrive together with SAP S/4HANA Cloud 2011. Again a release, where the major changes in our app happened behind the scenes. Still, we did at least some improvements that are visible to the user with the naked eye. Let’s talk about these first, before we take a look behind the curtain.
Although it’s little, let’s start with the last gap that we closed between the old Custom CDS version and the new version, we introduced in 2002: You are now able to see when you used fields or data sources that were deprecated by SAP and you can now also see the successors if they are available which makes reworking those views more convenient.
It sometimes takes a while, but we are trying to automate things, where possible. With the pre-selection of the representative key, we added another one of these pain-relievers. When you build a custom dimension view for analytics, this view always needs to have a representative key which can be hard to choose as you have to examine your source views for that. The new app will now pick the representative key for you, if it can be derived from the primary data source, which often is the case.
When you have to manually add an association to your custom CDS view, you usually strive for a so called “to one” association in order to avoid multiplying your result set.* You usually do this by mapping all the key fields of your target data source in the on condition. With this release, we introduced a button, that does at least add all these key fields to the join condition for you. Okay, this may be just a small step – but I like that tiny new button and maybe we can add some extra “intelligence” to it in the next step.
We also introduced more spot checks, especially for the analytical scenarios. Also our input validation became more accurate now. I don’t want to mention all of the checks here, but they will help you build your content quicker as you will become aware of potential modelling flaws in an earlier stage. As we do have more checks now, we also tried making it easier to identify to which element an error or warning belongs to and introduced an according marker in the table on the elements tab.
In rare cases it happened, that an element property was effective but you could neither see nor remove it in the custom CDS views app. This could have lead to an unexpected behaviour of the resulting view. Since 2011 we make sure that “what you see is what you get”. Whenever an element property (a.k.a annotation) is empty now, it will be taken care that it is not effective (neither directly nor inherited from an underlying view).**
In case of the text view property where a text view is specified that is used to refer to translated labels and descriptions for the selected field, you will now be able to see which of the available options are specified as text views and are therefore likely to be more relevant.
Behind the Scenes
Sometimes, we are asked for best practices on how to build more reliable views, how to model a view or even a stack of views to achieve the best performance. In the meantime, there are also some blogs available that deal with that topic.***
One thing, that I want to point out here, although it is not (yet) visible in the Custom CDS views app, is the relatively new annotation supported capabilities. The annotation is set to SAP VDM views and documents for which purpose(s) a view was built. A view can have multiple capabilities and the most important one for CDS view building is called CDS modelling data source. It describes, that a view is intended to be used as a data source for modelling CDS views.
In the meantime, the majority of VDM views do have this annotation set which makes identifying the right data sources a lot easier. As this annotation is not yet available in the Custom CDS Views app, you can use the View Browser app to check your source views which anyhow is the tool of choice when it comes to research on data sources.
The second thing is that we analysed the performance of lots of custom CDS views itself and improved the structure in order to optimise their performance within more challenging situations like e.g. their usage in deep view stacks or when using very complex data sources. Whenever you use the new custom CDS views app now to build new views from scratch, the improved structure will be applied. This happens behind the scenes right now and you cannot influence it. I wanted to bring it up anyhow, so that you are aware of it.
Conclusion & Outlook
To sum it up, using the new app to build new views is a good thing and there is no reason why you would still want to do it with the old app. The new app has (in terms of modelling) all the features of the old app (and even more), performs better, builds more versatile views and is more usable. We therefore decided to disable building new views with the old app. The old app will still stay available and of course you will also be able to edit your existing views with it.
In the next releases we will continue to focus on the view building experience. The supported capabilities will move in the app and we will try to bring the new optimised view structure into your existing views as well wherever this is possible.
Stay tuned for the next update at the end of January (I’ll try to be in time). Until then, stay safe and healthy! Thanks for reading.
** Technically it is deactivated by locally stopping the annotation inheritance
*** Apart from the help on supported capabilities, you can check the objectModel help and check the annotations sizeCategory, dataClass and serviceQuality. You will be able to see those in the view browser again when you browse the VDM Views there. There is a short and comprehensive blog post available as well.