Providing Value Help

Objective

After completing this lesson, you will be able to define Value Help

Value Help for Variables

When business users are required to enter a value for a parameter, they often don't know which values are available. Even if they have some idea of the values, they might not know the precise format needed to enter the value. For example, for a date, is it mm/dd/yy or dd-mm-yyyy?

For each prompt, it is possible to provide the business user with a list of all valid values. This is called value help and can be defined for each individual prompt.

Cube-based Value Help Definition

In most cases, value help is automatically available from the underlying cube. This means the developer of the analytical query does not have to include any special code in the analytical query definition. However, for some prompts, a value help may not have been defined in the cube.

Let's look at how a value help is made available to the business user.

the code to implement value help and how it look in the query result

In the code above you see we have two parameters: P_Airline and p_Planetype. Notice that p_Planetype does not have a value help (notice that the drop-down icon is missing).

When we look at the code above, we do not see any indication of the value help definition. Both parameters look the same, with no special annotations. Why does one parameter have value help but the other parameter does not?

how value help is defined from associations in the cube definition

We need to look at the underlying cube definition to understand why one parameter has a value help and the other parameter does not.

In the code of the cube definition notice AirlineID has an association _Airline. This association accesses the dimension / DMO / ANA_I_Carrier to provide a complete list of all airlines. This is how the value help is generated for the prompt.

But notice that PlaneType does not have an association. This is why there is no value help for this element.

So it is the cube that provides the value help for the prompt, and we do not need to add anything else in the definition of the analytical query.

If we would like to have a value help for the PlaneType we should now speak with the owner of the cube and request that the association to the dimension is defined.

Watch the video below to learn how value help is derived:

Query-based Value Help Definition

If a value help is missing for a prompt, and it is not possible to add the association in the cube definition, you can also enable value help in the analytical query definition.

the code to define value help in the query

In the code, you can see we have added the annotation @Consumption.valueHelpDefinition for the parameter P_PlaneType. For the annotation settings, we point to a CDS view / DMO / ANA_C__PLANETYPE_VH that has been created to provide all values for PlaneType.

Including the annotation @Consumption.valueHelpDefinition in the analytical query definition overrides the standard value help defined in the cube. So this approach might be useful to divert the value help away from using the standard definition, to a special, dedicated list of allowed values for your analytical query.

Log in to track your progress & complete quizzes