Quantcast
Viewing all articles
Browse latest Browse all 3019

Re: Remove hard coded calculations from CDS-views

Hi Dominik,

 

hard question at least no yes/no answer possible Image may be NSFW.
Clik here to view.

 

I guess when you talk about CDS views you mean ABAP CDS Views. This means that the views are managed by ABAP (i. e. the lifecycle), so I would stick to the ABAP world for your requirements and not go to HRF as the artifacts there are linked to the HANA lifecylce management and you have to deal with issues keeping the stuff synchronized. Anyway to the best of my knowledge the HRF is not really tightly integrated into the ABAP world and this might be a real issue if you want to adress them from ABAP (native SQL for sure is always possible, but I would not recommend that).

 

So sticking to BRFplus there is the DB lookup exprression that allows you to model SQL statements in BRFplus. But there are some limitations e. g. you cannot call a CDS View with parameters. I do not know if they will be removed some day, so you cannot directly interact with CDS views with(!) parameters from BRFplus. So I see two options in order to get more flexibility in your scenario:

 

Option1:

You can call the first CDS view(s) from ABAP getting some result set. Thena ou call a BRFplus function that takes this result set and determines the parameters for the consequent call of CDS views with parameters. So the result data object of the function call returns the parameters back to the ABAP and you can call the second CDS view with those parameters.

 

Option 2:

You encapsulate the CDS view calls in class methods that can be called by BRFplus via the procedure expression. You would then somewhere in your ABAP program call a BRFplus function. This function internally calls the encapsulated CDS views via a procedure call expression. As in option 1 the first call would return the input for the BRFplus and then you can determine the input parameters for the second procedure call in BRFplus.

 

Any combination of these options is for sure also feasible. It really depends on the concrete scenario and where you want to put more flexibility/agility into your prgram flow by BRFplus

 

Hope that gives you some hints and ideas how to deal with the situation you described.

 

BR

Christian


Viewing all articles
Browse latest Browse all 3019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>