Inicio del área de contenido

Procedimiento Variables for Characteristic Values Localizar documento en árbol de navegación

If you do not want to specify a fixed value for a characteristic in a report, you need to use a variable for a characteristic value. You can use these variables in both basic and form reports, and can define them in the form or in the report itself. Global variables of this sort are generally used in the form, and replaced with a characteristic value in the report definition or when the report is executed.

Certain variables for characteristic values, such as the current fiscal period &0FP (current fiscal period), are delivered with the standard R/3 system. The standard variables differ from application to application. You can display these in variable maintenance. Use of variables for characteristic values

Using Variables for Characteristic Values

To define a variable for a characteristic value in a report, activate the indicator Variable on/off on the entry field for the characteristic value. and choose the function Edit ® Variable on/off.

If you want to use a variable for a characteristic value in a form, choose the pushbutton Variables on/off in the dialog box for characteristic values. The system then shows a dialog field, where you can specify the variable to be used.

Global variables need to be defined in Customizing before you can use them in a report or form. For information about maintaining global variables, see Overview: Variables.

Local variables are unique within the given form and for the given characteristic. Consequently, you can use the same variable name for local variables for two different characteristics.

Variables for characteristic values which apply to numerical fields (such as Year for the current fiscal year 1999) can be added to constants (such as Year 1 for the previous year 1998). This is possible for both global and local variables for characteristic values.

Ejemplo

You want to create a form in which you define the first column with a variable for the year. The second column should contain the previous year.

In the first column, choose the characteristic Fiscal year and specify it using the variable Year. Year has already been defined as a global variable with mandatory entry.

In the second column, choose the characteristic Fiscal year again, and enter Year 1 as the variable. When you later create or execute a report which uses this form, the system will merely ask you to specify the variable Year, and determine the previous year automatically.

Maintaining local variables for characteristic values

You create local variables by determining that an element is to be defined by a characteristic value variable.

When editing a form using the function Change form or Create form, you can obtain an overview of all variables to be used in the form. To do this, click on Este gráfico es explicado en el texto respectivo or choose Extras ® Variables ® Variable definition. The system then displays a dialog box containing a list of the local and global variables used in the form. You can specify for each local variable whether or not it must be replaced with a fixed value in the report. If you do not maintain this, the system will assume that it is a mandatory entry. You can also maintain texts for local variables here.

In the transaction Create report, you maintain local variables by setting the Variable on/off indicator for a characteristic and then making the required entries in the following dialog box.

For an example of how to use variables for characteristic values, see Example: Use of Variables.

 

 

Fin del área de contenido