Technical Articles
Text CDS View Advanced Scenarios
Creation of text CDS views is routine and trivial thing. Following advanced scenarios will challenge you:
Defined both short and long text
All you need to do to define both short and long text is to annotate two fields one short and one long as text
Define text for master data that is not materialized
There are cases when master data and text is not materialized in tables. In this case you need to build them virtually in CDS view. It can easy be done using SELECT FROM DUMMY in CDS view table function AMDP, but to make it easy and avoid a hassle of creating additionally ABAP class you can do the same in the CDS view itself. All you need a 1 record (unique record) selection for each text. The easiest way it is to lookup CDS view itself in TADIR table
Below is complete CDS view source code
Good article.