Variables for Texts

If you want to use variables to define the texts in the headers of columns or rows, you need to use text variables. For example, if you use a variable for a characteristic value when defining a report, the system does not yet know the text for this value. Here you can use a text variable.

Text variables can only be used in form reports. They are defined in the form itself and replaced when you execute the report.

Certain text variables, such as &0RESULT (text for the totals row in a report), are delivered with the standard R/3 system. You can which standard text variables exist in your application in the transaction for variable maintenance.

Using variables for texts

You can enter a text variable (by entering a leading &$ or &) anywhere where you can enter texts in a form.

Global variables need to be defined in Customizing before you can enter them in a text field of a form. To maintain global variables, see Overview: Variables.

For local variables, you need to enter &$ followed by a name for the variable. You can enter the local variable in the row or column text itself, or in the dialog box where you enter short, medium and long texts. Once you have entered a local variable, you need to maintain it.

Maintaining local variables for texts

Like variables for characteristic values, you can maintain local text variables under the menu option Extras   ® Variables   ® Characteristic value ® Maintain variable.. .

For variables for texts, the replacement type determines how you need to proceed. In most cases you will probably choose to store a replacement path so that the system can determine the text automatically from the master data. Note that the system can only automatically replace those variables which refer to an element with characteristics, and only if you selected the desired characteristic when you defined the element.

You need to specify the text length when you define the variable. The name of a local variable can have up to 8 characters. If you choose, replacement by manual entry, the text length is identical with the length of the variable name.

Note that in the characteristic field Period/year, the period is at the end of the field. If you want to replace a text variable with the current period, you need to enter the following in the last dialog box: from 5, length 3.

For a detailed example of how to use variables for texts, see Example: Use of Variables.