Creation of Compounded Dimensions with ABAP CDS Views
When it comes to compounded dimension ABAP CDS views you do not need to create them often. But when you do, you might be lacking experience in this area. In my blog I shed some light on this topic. Do not forget a bonus – Field Name dimension that can be used in your next change management CDS view query.
As you can see in my change management CDS view query example cryptic table fields are complemented with table field descriptions. It is possible thanks to using Field Name custom compounded dimension CDS view. Field Name dimension is compounded with Table Name dimension. This is because the same field might exists in multiple tables and have different descriptions. Compounded dimension takes care of it all.
There are a few important points you need to know when creating compounded dimension CDS views:
- Compounding fields are defined before compounded field in the list of key fields and annotated with foreign key association
- Compounded field is defined last in the list key fields and annotated with text association (if applicable)
- Representation key is defined as compounded field
There is only one important point you need to know in case of compounded text CDS view:
- Compounding fields are defined in the list of key fields before compounded field
Compounding dimension and text CDS views are very trivial:
You can download complete source code for Field Name dimension CDS view from GitHub: