Start of Content Area

Function documentation Using Variables in Web Applications  Locate the document in its SAP Library structure

Use

Variables allow you to wait until the Web application is actually displayed in the Web browser before you fill individual parts of the query or the entire query with values. 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, or variables that are input ready. For more information, see Variables.

Prerequisites

The query on which the Web application is based must contain variables.

Settings in the Web Application Designer

You can make settings for variables and the variable screen in the BEx Web Application Designer. To do this, you select the relevant template from the dropdown box in the header of the Properties dialog box. The following options are available on the Web Template Parameters tab page:

      Display Variable Screen (VARIABLE_SCREEN)

If Display Variable Screen is not selected, the variable screen is only displayed if mandatory variables are not filled. If Display Variable Screen is selected, the variable screen is always displayed.

      Use Specific Variant Catalog (USE_SPECIFIC_VARIANT_CATALOG)

You can use this parameter for Web templates that contain one or more data providers with input-ready variables.

Note the following dependencies between the settings for this parameter and the system read and save behavior for the variants:

       If you select this parameter and just one data provider is used in the Web template, the variants for the corresponding query are read and saved.

       If you do not select this parameter and just one data provider is used in the Web template, the variants for the Web template are read and saved.

       If more than one data provider is used in the Web template, this parameter has no effect on the variant display. The variants for the Web template are always read and saved. 

      Reset Variable Values to Default (CLEAR_VARIABLES)

Using Reset Variable Values to Default, you can restore the default values for variable values. The SPA/GPA parameters for the variable values are used as the default values, that is, if the user has already specified a value for the variable during the current session. The SPA/GPA parameters are overwritten by the values from the variable definitions (including execution of customer exit) – assuming values are available in the variable definitions. Similarly, the values from the variable definitions are also overwritten if personalized values are available for the variable values.

Note

SPA/GPA parameters are values that are saved in the global user-specific SAP memory. Using the SAP memory, values can be passed between programs across all transactions. The SAP memory is available to users for the duration of their session and for any parallel modes.

When variable values are restored to the default values, all variable values from query views and bookmarks are ignored (see Setting Bookmarks).

      Display Same Variable Only Once (MELT_VARIABLES)

If Display Same Variable Only Once is selected, variables that are the same for different queries are displayed only once.

      Variant (VARIANT)

You use this parameter to specify the variable variant with which the Web application is to be executed.

For more information about the parameters, see Web Template Parameters.

For more information about commands for variables, see Set Variable Values and Open Variable Dialog.

Functions of the Variable Screen in the Web Application

More information: Working with the Variable Screen

 

End of Content Area