By converting a Report Painter report to a Report Writer report, you can allow for the multiple use of characteristics in the report. You can include a characteristic, such as period values, in both the selection criteria and the report itself.
Key Concept
Although Report Painter is similar to Report Writer, the main difference between the two tools is the graphical user interface of the Report Painter. The use of sets in Report Writer is another difference. Report Painter, though easier to use, lacks certain functions that are available in Report Writer, resulting in certain limitations, such as the ability to use characteristics, such as periods, in both the selection criteria for the report, as well as the report itself.
Have you ever tried to modify a report to include period values on the selection criteria screen, but were unable to do so because the characteristic Period was not available for selection in the General Data Selection screen? This dilemma is due to the Report Painter limitation of using characteristics only once. For example, if the characteristic Period is already used in the report layout itself, you cannot add period values to your selection criteria using Report Painter. Therefore, you need to convert the report to a Report Writer report because Report Writer allows for the functionality of using characteristics more than once. The key to accomplishing the solution lies in a setting within the header of the Report Writer report.
In my example, I am using a custom report that you can call using transaction ZC12 (Figure 1). Note that the selection criteria include Fiscal Year but not any selection for Period.

Figure 1
Selection screen for cost center plan by period — transaction ZC12
In transaction GRR3, which displays Report Painter reports, the report looks like what is shown in Figure 2. Follow menu path Edit > Gen. Data selection to look at the general data selection (Figure 3). As you can see, Period is not available for selection under Available characteristics.

Figure 2
Display of cost center plan by period report

Figure 3
Element definition: general data selection
I’ll show you how to add the Period characteristic by following a six-step process. The screenprints in my example are from SAP ERP Central Component (SAP ECC) 6.0, but it works equally well in earlier versions of SAP R/3.
Step-by-Step Process
Use the following procedure:
- Step 1. Identify the Report Painter report that you want to change to a Report Writer report
- Step 2. Convert the Report Painter report to a Report Writer report
- Step 3. Select an indicator in the Report Writer header to allow multiple use of characteristics
- Step 4. Bring the From Period and To Period characteristics into the general data selection
- Step 5. Create a transaction for the new report
- Step 6. Use variables to select the periods for which you wish to run the report
Step 1. Identify the Report Painter report that you want to change to a Report Writer report. In this example, I’m using a custom report called by custom transaction ZC12. In other words, when I enter custom transaction ZC12, the screen shown in Figure 1 appears. To find out the report name, you need to find the technical information. From the selection screen, select Environment > Technical Information (Figure 4). Double-click Report group (Z1AB in this example) to bring up the screen shown in Figure 5. Then click the Reports button to bring up the screen shown in Figure 6. From here you can see the associated reports. In this example, I’m modifying report Z1ABW-PL. Note that the report name is different from the report group name. This is because the report group can contain one or more reports; a report is assigned to a report group.

Figure 4
Technical information for report group Z1AB

Figure 5
Header screen for report group Z1AB

Figure 6
The reports associated with report group Z1AB
Step 2. Convert the Report Painter report to a Report Writer report. Copy the report using transaction GR31 (Figure 7). I’m essentially creating a new report by copying Z1ABW-PL, so I have to give it a new name (Z2ABW-PL).

Figure 7
Copy the report using transaction GR31
Step 3. Select an indicator in the Report Writer header to allow multiple use of characteristics. From the screen shown in Figure 7, press Enter or click the Header button to arrive at the screen shown in Figure 8. Then select the Multiple usage allowed radio button and save.

Figure 8
Select the Multiple usage allowed radio button
Note
You may receive the error message “Entry E does not exist – check your entry.” I did when running this in SAP R/3 4.6C. In this case, change the Original Language setting to German. This setting won’t change your screen to German, it just seems to be a fluke in SAP R/3 4.6C.
Step 4. Bring the From Period and To Period characteristics into the general data selection. Use transaction GR32 to bring up the Change Report screen and click the General data selectn button to bring up the screen in Figure 9.

Figure 9
Figure 9 Change Report: General Data Selection screen for report Z2ABW-PL in library 1AB
Highlight the next available row under Set ID and click the Set… button (Figure 10). Because you want to add Period to the selection criteria, you can narrow down your search by entering *period* in the description field. Note that the asterisks act like a wildcard, so placing them around the word “period” includes in the search results all sets that have the word “period” in the description, regardless of what is written before or after the word “period.”

Figure 10
Criteria screen to search selection sets
Click the green check mark icon or press Enter to arrive at the screen shown in Figure 11. Double-click the set name you’re interested in (e.g., 1C-SEL-PERBL.CCSS) to bring up the screen shown in Figure 12.

Figure 11
Selection results for sets containing the word “period” in the description

Figure 12
The fifth line of the Change Report: General Data Selection screen for report Z2ABW-PL in library 1AB is populated with the set selection
Note the settings I added on the right side of the screen. These were not automatically populated, so you have to add them. I used 1 and 12 for the Frm and To fields, respectively, to allow for selection variants between periods 1 and 12. For more information on these fields and the I field, simply highlight the field by selecting it with the cursor and press F1 for SAP help. Then save your entries.
Now you’ll want to see if your modifications successfully brought From Period and To Period into the selection screen. From the Change Report: Initial Screen, follow menu path Report > Execute. Save this new report in a report group by clicking the Yes button in the resulting pop-up screen. The system then prompts you to enter a report group. I created a new one, ZC13. You can choose any report group, but I created a new one to keep my reports organized according to my preference. The system alerts you that the group does not exist, but you can proceed through the warning by clicking the Yes button. Then click the execute icon in the resulting screen.
You can see that From Period and To Period have been successfully added to the criteria screen (Figure 13). You can reach this screen by entering the transaction for the custom report (e.g., ZC12).

Figure 13
Selection screen for cost center plan by period
Step 5. Create a transaction for the new report. I created transaction ZC13. For an explanation of how to do this, see Martin Ullmann’s article, "Create a Transaction Code for Report Painter Reports Properly."
In the screen in Figure 13, you can see that the default value for To Period is 13. This is established in the variable used in the set you selected, namely set 1C-SEL-PERBL.CCSS in this scenario. To change this value, you need to modify the appropriate variable.
Step 6. Use variables to select the periods for which you wish to run the report. Use transaction code GS03 to display the set 1C-SEL-PERBL.CCSS used in report ZC12 (Figure 14).

Figure 14
Display the set
From here you can see that in the basic set 1C-SEL-PERBL.CCSS, two variables are used: &1CPERIV for the From value and &1CPERIB for the To value. Double-click &1CPERIB to see that 13 is the default value for the To Period (Figure 15). This signifies the 13th period; SAP offers four special periods — 13-16 — that you can use for quarterly reports, for example.

Figure 15
Display Value Variable: Basic Data screen for value variable 1CPERIB
To change this, go to transaction GS12 and enter the variable 1CPERIB. Here you can change the default value (I chose 12). The system displays a warning because you are changing an SAP-delivered variable. SAP recommends creating and using your own variable in the customer-naming range to avoid the risk of your change being overwritten in the future. Because my change to the SAP-delivered variable is minor (only changing the default value of the To Period field from 13 to 12), I am not concerned about any updates overwriting my change. Most likely, I’ll be changing the From Period and To Period values in my report when selecting my criteria anyway, depending on what periods I wish to analyze in my report. So it’s OK to execute this change, but just be aware that at some point in time the object (variable) may be overwritten again by a version delivered by SAP.
To change the selection variable for Actual(4) / Plan(1), use the same method as explained above. The name of the value variable is ZWRTTP. I changed it to 4, to default Actual instead of Plan. After this procedure, you can see in the selection screen that transaction ZC13 has the To Period and From Period Values, along with the Actual(4) / Plan(1) field (Figure 16). It includes the change I made to the standard To Period value.

Figure 16
Selection screen for Cost Center Plan by Period
The benefit is that you can now specify certain periods to view, for example from period 5 to period 7 (if you only wanted to see May through July results, assuming your fiscal year is the same as the calendar year). Without this new option, the report would display all periods, up to and including the current period.
Csaba Radnoty
Csaba Radnoty is an independent consultant with more than 12 years of SAP experience in Financial Accounting, Controlling, and Project Systems. His work experience includes a year and half as SAP Financial Systems Manager for a linen and uniform rental company, more than five years as a senior consultant with Deloitte Consulting, four years as a senior SAP systems analyst with a small software development company, and more than five years as a senior financial analyst with a government contractor. He holds a certificate in systems analysis, a bachelor of arts degree in management, and master of science degree in international business.
You may contact the author at cradnoty@comcast.net.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.