As mentioned in CDS views: HowTo use in BW contexts, it is possible to define a 'ValueHelp' for a variable based on a field or parameter in a CDS query(@Analytics.query: true) which depends on the value entered in another variable. This dependency is called Binding and the main corresponding annotation is @Consumption.valueHelpDefinition.additionalBinding. In the following we take a closer look at a simple example which should help to better understand how this feature works.
The following CDS query has two parameters, p_carr1 and p_ccode. The underlying CDS cube is based on the table SFLIGHT. Regarding p_carr1 we defined a value help which retrieves the values from the associated CDS dimension ZGL_CARRID. The value help regarding p_ccode also refers to this dimension and gets the values from the attribute CurrencyCode of ZGL_CARRID.
CDS Dimension ZGL_CARRID
So, e.g. the Airline AA has the currency USD assigned and the airline SQ the currency SGD. We now run the query and check the F4 help of parameter p_ccode:
The variable screen contains the two variables based on the two parameters. We change the value AA to SQ and then click the F4 help of variable 'currency code'. The results is as follows:
As expected only the value SGD is displayed since it is the currency of airline S(see content of dimension above).