Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Display Parameter value in CDS View Column

tom_darsy
Participant
0 Kudos

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

1 REPLY 1

pfefferf
Active Contributor
0 Kudos

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.