Defining Variables
Use
You define variables as placeholders that are filled with values at query runtime.
Prerequisites
You have called the variable editor in the Query Designer. For more information, seeCalling the Variable Editor.
Procedure
The variable editor automatically provides you with only those selection options that are allowed for the combination of variable type and processing type. For more information, seeVariable Types and Processing Types: An Overview.
You make the required settings on tab pages:
Tab Page: General
This tab page displays the type of the variable. You determine the type of the variable by calling up the variables editor in a specific context.
- Enter a description for the variable.
- If necessary, change the automatically generated suggestion for the technical name of the variable. The generation rule for the technical name is VAR_<date><time> (example: VAR_20050818122045). You can change the generated suggestion for the technical name as long as you have not yet saved the variable. The technical name of each query must be unique.
- In the Processing by field, choose the processing type for the variable. The type of variable dictates which processing types appear for you to choose from in the dropdown box. For more information, seeVariable Processing Types.
- In the Reference Characteristic field, select the InfoObject on which the variable is to be based.
In the case of characteristic value variables, the default reference characteristic is the characteristic for which you are defining the variable. You can also use the dropdown box to select the basis InfoObject that the characteristic references. The variable is then defined on the basis InfoObject.
The characteristic reference is not shown for text and formula variables with the processing type Replacement Path. You must therefore use the dropdown box to select the characteristic to which the variable relates. The system provides a choice of all InfoObjects and basis InfoObjects that are contained in the InfoProvider on which the query is based.
The following tab pages are context-sensitive:
The tab pages that are available depend on the variable type and the processing type that you chose. You make the required settings on these tab pages.
Tab Page: Advanced
Here, the unique ID (UID) that is used for unique identification is displayed. The UID represents the database key under which the variable is saved. This field is only used for information purposes. For example, you can use the UID in URLs of the Web API to address this element. However, we recommend that you use technical names, because UIDs can change when an object is deleted and then re-created. In addition, you can specify the UID when contacting SAP support, as this helps to solve problems quickly.
Saving variables
Choose OK. The variable is saved with the settings you made and the variables editor closes.
Result
You have defined a variable. The changed variable can now be used in all queries.