Custom CDS Views – What’s New in 2202
The upgrades to 2202 will start this week. So it is time again to provide you with the latest update on the Custom CDS Views app again.
[Updated February 8th with the new Value Help Scenario]
[TLDR] Here is the brief summary of the most important news:
- Custom CDS Views can now be translated now with the Maintain Translations app
- The data source value help is now initially filtered to the recommended data sources
- We are now migrating your existing Custom CDS Views to view entities if you publish them
- The deprecated Custom CDS Views app was switched to a display only mode
- [Update] Included a new scenario that makes it more comfortable to build value helps
To translate the labels in your Custom CDS Views, you need to use the Maintain Translations app. In the app, you create a translation project and add the Custom CDS Views to it that you want to translate. You can then add specific translations for each language. The app will generate a so called XLIFF file for each translation. Once you did the translation, you can upload the file, publish it & the translation is ready to be consumed.
In the custom CDS views app, you can check the translated text in the preview when you are logged on in the target language. The form fields in the app will always stay in the original language though.
Data Source Value Help
The data sources are now initially filtered so that the initial choice is limited to the suitable data sources. If you need to pick other data sources for whatever reason, you can still remove the filter. However, we do not recommend it.
I explained the advantages of view entities in the blog post on 2108 where we also allowed view entities to be used as data sources for Custom CDS views. Since 2111 we do also save new Custom CDS Views as view entities and with 2202 we will now even save existing, compatible Custom CDS Views as view entities.
If your view is not compatible, you will be warned and it will be explained to you how you can change it so that it can be converted to a view entity. The necessary adoptions are usually adjusting element properties but can also involve changing the association definitions (in case you used other fields than the one from your primary data source, see the last blog post where I talked about the usage of projection fields).
If you decide not to adapt or if you cannot change the view in a compatible way, which may be the case with the association conditions, you may ignore the warnings. You will definitively not be forced to adapt your view and it will still stay intact and working as it was before.
[Update] New Value Help Scenario
Within the Custom Fields & Logic app, you can create Value Helps for the use in Custom Business Objects. This is very easy but has some limitations in the first expansion state. E.g. you can only use up to five fields and you cannot influence their order. To overcome these limitations, you could build a standard Custom CDS Views on the Custom Business Object and use it in the custom field instead. The result looked a bit ugly though: The technical UUID was shown on the UI instead of the semantical ID and the search did not work either. The reasons were that the standard Custom CDS Views are built for standard reuse and therefore are not search enabled. Also they do not allow removing the key of the primary data source for stability reasons.
With 2202, the custom field colleagues teamed up with us and addressed these shortcomings of standard CDS views in the value help usecase by introducing the new Custom CDS Views scenario “Value Help”.
Old Custom CDS Views App Now Read Only
The new Custom CDS Views app was introduced two years ago with the 2002 release of SAP S/4HANA Cloud. With 2011, we reached feature parity with the editing features and the old app was deprecated so that it could only be used to edit existing Custom CDS Views.
With 2202, the vast majority of Custom CDS views at customers are managed with the new app and we can therefore go one step further and switch the app to a pure display mode.
Don’t worry. This does not mean that the views, you still manage with the old app, turn useless. They will stay working as before and you can still manage them there. Only in case you want to change or enhance them, you need to react and can then migrate the view to the new app and do your changes there: In a more performant, more versatile and more future proof way 😉
The deprecated Custom CDS Views app will still stay available at least as long as the functionality to preview CDS views is available in an alternative app.
In the next releases, we will work on improvements under the hood again, but will also work on smaller functional updates in the element properties and filters. I hope we can also bring the copy functionality for Custom CDS views which will make it easier to build similar views in parallel or to try out planned modifications. I will keep you posted with our progress.
Stay healthy & thanks for reading!