Show TOC

Using Variables in BEx AnalyzerLocate this document in the navigation structure

Use

You can use variables to fill single components of a query or an entire query with values when displaying it in BEx Analyzer. Variables act as placeholders for characteristic values, hierarchies, hierarchy nodes, texts, and formula elements, and can be processed in many different ways. There are variables with automatic substitution, substitution from authorizations, and input-ready variables.

More information:Variables.

Filling Variables with Values

When a query or workbook is processed, the variables are filled with values from the following sources:

  1. If you have saved a variant with the Use as Default Variant indicator for the current object (query or workbook), the values of this variant are used.

    More information:Saving Query Variants

  2. If the Process Variables of Refresh flag is selected, the values saved in the workbook are selected for the variables in the characteristic restrictions of the query.

    If the Restore Initial Query View on Refresh flag is not selected for the data provider, the navigational state is taken from the workbook, and the values saved in the workbook are selected for the variables in the query's default values.

    More information:Workbook Settings

  3. Personalized values of variables

    More information:Personalizing Variables

  4. Default values of variables

    More information:Default Values

The sources listed first take precedence over subsequent sources. If the Process Variables on Refresh flag is selected for example, and there are personalized values for the variables, the values saved in the workbook are used, not the personalized values.

Specifying Variable Values in the Variables Dialog

Depending on the settings that you selected for the workbook, the Variables dialog is automatically displayed or the query or workbook is executed straight away.

Function Display of Variable Dialog

Opening a query directly

The Variables dialog is always displayed if the query contains input-ready variables.

Opening a workbook that the Refresh Workbook on Open flag is not set for

When you update the workbook, the system checks whether it contains mandatory variables without values. If there are no values, the Variables dialog is displayed. If there are values, the workbook is displayed straight away.

You can manually change the variable values however by choosing Change Variable Values to call the Variables dialog.

More information:Changing Variable Values.

Opening a workbook that the Refresh Workbook on Open flag is set for

The Variables dialog is always displayed if the query contains input-ready variables.

If values are already saved for the workbook, these are displayed as predefined settings in the Variables dialog. You can accept or change these values.

You can also save a variant for a query. This is a query that you have already selected and saved variable values for. When you next open the workbook, you can call the variant. You can change the variable values for the variant in the Variables dialog. You can also create multiple variants with different variable values for a query. If the workbook contains multiple queries, the variants are created for the workbook.

More information:Saving Query Variants.