G. Specifying Details of Variables
G. Specifying Details of Variables
14
• Replacement from Query:
Characteristic value variables with the Replacement Path processing type can be replaced with
the results of a query. The variable is replaced from the data result of the selected query.
• Replacement from Variable:
Characteristic value variables, text variables, and formula variables with processing type
Replacement Path can be replaced by the value from a different variable, the source variable.
The value is determined either from the key, the external attribute of the key, the description,
or the attribute value. You can also define an offset start and offset length. The variable is
replaced in the Variables screen with each data release.
16. Authorization
With the Authorization processing type you can specify that a variable is automatically filled with the
values from the user authorization. When the user opens a query, the system automatically selects the
data according to his or her authorizations.
The Authorization processing type can be used with characteristic value variables and hierarchy node
variables. As a precondition, you must have maintained the authorizations.
15
19. SAP Exit
The SAP exit processing type is contained in variables that are delivered with SAP
BW/4HANA Content Add-On.
Note that you can use the variables provided by SAP only once they exist as an active version.
You may have to activate these delivered variables before you can use them.
16
• Replacement Path
• Default Values
• Currencies and Units
• Dependencies
Only the General and Dependencies tabs always appear; the other tabs are shown depending on the
context in which you are defining the variable.
The easiest way to create a new variable is as follows:
17
Figure 11: Find and open an existing variable
a. Variable Represents
Variable Represents is used to select the display area that the variable represents. You can choose from
the following options:
18
Variable Result
Represents Value
Values setting with hierarchy nodes to enable the user to enter several single nodes.
Interval The variable represents a from value and a to value.
The variable represents a combination of selected single values and intervals.
Selection Option In addition, when you select values for variables, you can use operators (>,<,=,
and so on), patterns (for example, A*), and exclude values.
b. Details
Table 3: Details Value
Details Value Result
Used to specify whether the variable input is Optional, Mandatory With
Initial, or Mandatory Without Initial. A mandatory variable entry means that
Input Type the blank value # is permitted to signify an unassigned value. You can select
all data records within which the characteristic has no characteristic value.
Copy Personalization Used to personalize variable values for input-enabled variables for each user.
Data from Variable Personal values are saved for each variable and each user.
19
Figure 12: Replacement Path Tab
With the Replacement Path Processing type, text variables and formula variables are replaced by a
value from a corresponding characteristic or from a different variable. The value for a formula variable
must be a number. The value for a text variable must be text.
20
Value Result
Determine the start and the length of the text output. For example, if the
Offset Start and Offset
first 10 characters of the text are to be used, the offset start value would be
Length
0 and the offset length value would be 10.
This function is only available for formula variables.
• The value of the variable is 0 if the value to be replaced is a string
Interpret Result as
Boolean Value with only blank characters or a zero.
(True=1; False=0) • The value of the variable is 1 if the value to be replaced is a string
with characters that are not blank or a number that is not zero.
Characteristic value variables are replaced by a query result with the Replacement Path Processing
type. Using a variable, you can reuse the data result of a selected query in another query as a prequery.
Each time that the query is executed, the prequery is executed first.
Note
Running a prequery may contribute to slow performance. If you do not need to run a prequery
every time you run the query, use a variable that represents a precalculated value set, so that
the variable values are stored over time.
21
XX. Managing Functions for Variables
In the SAP BW Repository tree, the variables are listed according to the variable type and whether
they refer to a characteristic or are unassigned.
Variable maintenance functions can be accessed from the context menu, as shown in the following two
figures.
The first figure shows Characteristic Value variables, Hierarchy variables, and Hierarchy Node
variables. These variable types always refer to a characteristic, whereby Formula variables and Text
variables can refer to a characteristic, for example, in case of the processing type Replacement Path.
Figure 13: Characteristic Value variables, Hierarchy variables, and Hierarchy Node variables
The second figure shows Formula variables and Text variables without a reference to a characteristic,
for example, in case of the processing type Manual Input / Default Value.
22
Figure 14: Formula variables and Text variables without a reference to a characteristic
23