Page tree
Skip to end of metadata
Go to start of metadata

In BW there is the concept of text variables where e.g. (parts of) the description of key figures are replaced by variables values during query runtime (see Text Variables for details). In the context of ABAP CDS queries (see Embedded Reporting on ABAP CDS views) a similar feature exists where the values of parameters can be used in the labels for key figures by using annotation @Consumption.dynamicLabel. The following simple example shows the basic concept.

Example

The following sample query has two parameters, p_date and p_airline, which are used to define a dynamic label for some key figures.

E.g for the key figure MaximumNumberOfSeats, the text 'MaxN Seats on &1 of Airline &2' defines the label where &1 and &2 will be placeholders for the parameter values entered during query runtime:
@Consumption.dynamicLabel: { label : 'MaxN Seats on &1 of Airline &2' ,
binding :
[ { index : 1 , parameter : 'p_date' },
{ index : 2 , parameter : 'p_airline' } ] }

Query Execution

We run the query in Transaction RSRT with following variable values

and note that the placeholders &1 and &2 were replaced by the values '05.09.2019' and 'AA'.

  • No labels