03-17-2021 12:23 AM
Hi
I have a requirement to display the parameter value entered by the user in the column header. Like if the user enters fiscal year 2020, then I want to show 2020 for the amount column. I am not able to use the parameter with
@endusertext.label. Any ideas
03-17-2021 6:30 AM
ABAP CDS does not offer to define the name of a view column in a dynamic way (except that you re-create the CDS view each time you execute it).
But from my point of view the requirement is nothing which needs to be covered directly in the CDS view itself, but in the analytical client which displays the result of the view. Normally you dimension and measure columns in your result (your year column = dimension, your value column = measure). Then the analytical client can display the information like required (e.g. by doing a simple pivot), which leads to that that the dimension column content is used as header.