
Variable
Definition
A variable can be used to make the creation of forms and reports more flexible. It is a parameter of the report that is determined at the time the report is started and that can be replaced in different ways.
There are two types of variables, local and global. In the G/L Account Information System, only global variables are used.
Use
Various variables are included in the SAP System for the G/L Account Information System. You can use the following variables for your forms and reports:
|
Variable |
for characteristic | |
Fiscal year |
&1FY |
Fiscal year |
&2FY |
Half year | |
&3FY |
Quarterly period | |
&4FY |
Month | |
Period |
&1PF |
From period |
&1PT |
To period | |
&2PF |
From period (half year) | |
&2PT |
To period (half year) | |
... |
... |
You can define additional variables. To do so, in Financial Accounting Customizing chose General Ledger Accounting ® Information System ® Drilldown Reports (G/L Accounts) ® Define Global Variables.
You can include constants with variables that reference a numerical entry field (such as &1FY-1 for the previous fiscal year).
Replacement of variables by the system
In the following examples for the G/L Account Information System, you can see how the system replaces the variables entered in the form (step 1) with values (step 3), based on user entries when running the report (step 2)
Example |
Step 1 |
Step 2 |
Step 3 | ||
Variable entered in form |
User entry when running report |
Output in report | |||
Column 1 |
Column 2 |
Column 1 |
Column 2 | ||
Year comparison for two fiscal years |
&1FY |
&1FY-1 |
Fiscal year: 2000 |
2000 |
1999 |
Half year comparison to previous fiscal year |
&2FY |
&2FY-1 |
Fiscal year: 2000 |
2000 |
1999 |
Quarterly comparison to previous fiscal year |
&3FY |
&3FY-1 |
Fiscal year: 2000 |
2000 |
1999 |
Monthly comparison to previous fiscal year |
&4FY |
&4FY-1 |
Fiscal year: 2000 |
2000 |
1999 |
Structure
The following variable types are used in the G/L Account Information System:
If you do not want to enter a fixed value for a characteristic in a form or report, you can use a variable for the value of the characteristic. You define the value for the characteristic when running the report.
If you do not want to enter a text in a form (for example, for a column header), you use a text variable. You enter the value for the text when running the report.

You can use the same variables for texts as those used for characteristics.

If you use a variable for the value of a characteristic in your report (such as fiscal year), the text for the column header is also not in the definition of the form. In this case, you select the same variable for the text variable as well as for the value of the characteristic.
You can find more information on variables in the SAP Library under Cross-Application Components ® CA Drill-Down Reporting ® Reports ®
Variables.