Introducing Variables


After completing this lesson, you will be able to:

  • Identify basics of variables

Variable Types

You use variables to define queries to have flexibility. You include variables in your query that will be filled with values when you execute the query. Typically this is in the form of a pop-up where the user chooses a filter value that is applied to the result. But there are many different types of variables that perform various actions.

Variables as Placeholders Instead of Defining Fixed Values

Here are the five types of variable that you can define in a query:

  • Characteristic values

  • Texts

  • Formula elements

  • Hierarchies

  • Hierarchy nodes

Reusable objects

Variables are reusable objects and can be reused in multiple queries. If you change the settings of a variable, it affects all queries where it is used.

Variables do not belong to InfoProviders, but to the Characteristic InfoObjects for which they were created. Variables are available in all InfoProviders in which the Characteristic InfoObjects are included.

Formula variables and text variables do not belong to Characteristic InfoObjects and are available in all InfoProviders.

Main Processing Types

A variable processing type defines how a variable receives its values.

There are three main processing types used in the following lessons and these are:

  • Manual Input / Default Value
  • Replacement Path
  • SAP Exit
Manual Input / Default Value

If you select the processing type Manual Input for an input-ready variable, you can manually enter the required value when executing the query.

In the definition of the variable, you can specify default values in order to replace or to support the manual entry of values when executing the query.

Replacement Path

You use the Replacement Path processing type to specify the value that automatically replaces the variable when you execute the query.

For example, when you enter a Characteristic value for a a characteristic value variable, you do not need to enter manually the text for the text variable straight away. Instead, it can be retrieved dynamically from the characteristic value or even from the characteristic value variable.

SAP Exit

The SAP Exit processing type is used in variables that are delivered with SAP BW/4HANA Content Add-On. With the SAP Exit, the variables are filled automatically from ABAP code.

Log in to track your progress & complete quizzes