Entering content frame

Function documentation Variables Locate the document in its SAP Library structure

Use

Variables are used to parameterize a  query, a planning function, a filter, a characteristic relationship or a data slice. When a query, planning function or Web application is executed, they are filled with values.

Variables act as placeholders for characteristic values, hierarchies, hierarchy nodes, texts, and formula elements, and can be processed in many different ways.

·        Depending on the objects for which you want to define variables, there are different variable types. For more information, see the documentation on the Query Designer under Structure linkVariable Types.

·        The processing type determines how a variable is filled with a value for the runtime of the query, planning function or Web application. For more information, see the documentation on the Query Designer under Structure linkProcessing Types for Variables.

Example

When you use variables, for example, one planning function definition can be used as a basis for many different planning functions: you want to create a planning function of type Copy that copies your current data from the current version to another version. You insert a variable into the To parameters of the planning function for the characteristic Version. Before you execute the planning function, you decide to which version the current data is to be copied.

Note

For formula variables that are used in planning functions for conversion functions, for example, the processing type Replacement Path is not available. Only the dimension Number is supported here.

Integration

Variables as Reusable Objects

Variables do not depend on one InfoProvider, but only on the respective InfoObject. A variable that you define for an InfoObject is available in all InfoProviders that use this InfoObject.

Variables can be defined in the Query Designer or in the Planning Modeler or Planning Wizard.

Example

For example, when you define a variable for a planning function in the Planning Modeler, it is available for reuse for all queries or planning functions.

Features

Variables help you to flexibly set or parameterize your objects. The following objects support the use of variables:

Usages for Variables

Object

Using Variables

Queries (especially input-ready queries)

·        For example for parameterizing characteristic restrictions in the query

·        In formulas, conditions, exceptions and as a placeholder for text

Filters

For the parameterization of characteristic restrictions that describe the filter

Planning functions

Depending on the respective planning function type for the parameterization of conditions and parameters, for example for the parameterization of the conversion factor in the planning function of type conversion.

Characteristic relationships

·        For parameterization of the hierarchy used

·        For parameterization of the selection from a DataStore object

Data slices

For the parameterization of characteristic restrictions that describe the data slice

Additional objects

For example for parameterizing  the presentation hierarchy in the query

Note

Variables that are used in characteristic relationships and in data slices cannot call a dialog for the manual entry of values. These variables must have a value at the time of execution.

In the Planning Modeler or the Planning Wizard, as well as in the Query Designer, the following tools are available for creating and changing variable definitions according to context.

Tools for Creating, Changing and Displaying Variables

Tool

Description

Variable Wizard

The wizard takes you through the process of creating a variable step-by-step. Each individual step is context-sensitive and is adjusted according to the combination of variable and processing types used. This means that the variable wizard only offers the selection options that are permitted for that combination of variable and processing types.

For more information, see the documentation on the Query Designer under Structure linkDefining Variables with the Variables Wizard.

Note the following when you use the Variables Wizard in the context of the Planning Modeler or Planning Wizard:

·        The first step is General Information.

·        The system shows further dialog steps according to context:

¡        Structure linkDetails

¡        Structure linkDefault Values

¡        Structure linkReplacement Path

¡        Structure linkCurrencies and Units

(There is no Characteristic dialog step).

Variables Editor

The Variables Editor dialog box offers all of the options for changing an existing variable. The individual tab pages of the dialog box show the previous settings for the variable.

Not all settings for variables can be changed later in the Variables Editor. For example, the variable type and processing type cannot be changed once the variable is created.

For more information, see the documentation on the Query Designer under Structure linkVariables in the Variables Editor.

Note the following when you use the Variables Editor within the context of the Planning Modeler or Planning Wizard: in addition to the change mode, the Variable Editor also has a display mode.

Activities

The tools for creating and changing variables are available wherever you enter constant values and can use variables.

In the Planning Modeler or Planning Wizard, you can also display and delete variables. In the restriction dialog for a characteristic, you see the list of the variables available for the selected characteristic in the Variables view for single values in the filter. The functions Create, Edit, Display and Delete are available here.

·        If you choose Create, the Variables Wizard opens.

Note

The Variables Wizard opens with the settings made for the current context: For example, if the Variables Wizard opens in the dialog for characteristic restriction, it has the settings that are appropriate for the type of variable (characteristic variable), the appropriate characteristic and the basic characteristic, as required.

·        When you choose Edit, the Variables Editor opens and you can change certain properties.

·        If you choose Display, the Variables Editor opens in display mode.

·        If you choose Delete, the system deletes the selected variables.

Note

For more information on using the tools in the Query Designer, see Structure linkUsing Variables: Variables Wizard and Variables Editor.

 

 

Leaving content frame