Skip to Content

Risk on Unified Modeling by CDS view's union?

Dear Experts,

We want to leverage ABAP CDS to create an universal modeling layer exposed to consumer and dispatch the route path to different data source at run time. I am here to ask if there is any potential risk of how we achieve it since it's quite a base decision which will impact many things in the future. Let me introduce how we achieve it in general:


Each view has a constant field as below:

And I create an universal ABAP CDS upon them:

As you can see I use p_src_type as input parameter to distinguish which data source consumer really want at run time. And execution plan show it works well which means at the same time only one of these sub CDS views will be executed to fetch out the data.

In this approach, one thing may be considered as a limitation is Extension, since of sub view want to extend one field then others has to follow...Is there any other risk to leverage this trick to unify modeling in CDS layer? I am wondering if there is something I cannot forsee and cause a big impact in the future...

Thanks for your advice in advance:)!!!



zreported.jpg (70.9 kB)
zstandardized.jpg (71.8 kB)
zunion.jpg (93.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • More specific on the question: “What’s the best way to change data source at run time and expose the same semantic layer in design time?”.

    By leveraging some tricks and HANA’s smart decision, we can do that as mentioned in question, but I am not sure if that’s the best way and if there is potential risk in the future.

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 27, 2018 at 06:03 AM

    This question is answered by latest SAP CDS Perf. Best Practice guidance.

    Detail is attached below:

    Add comment
    10|10000 characters needed characters exceeded