Sei sulla pagina 1di 40

Chapter :3

Report Painter/Report Writer

Contents
Learning the Basics of Report Painter/Report Writer.............................................2 Creating a Report with Report Painter.....................................................................7 Understanding the Report List...............................................................................27 Getting the Most from Report Painter/Report Writer: Tips & Tricks...................27 Review......................................................................................................................40 Where to Learn More...............................................................................................40

In this chapter you will: Understand the difference between Report Painter and Report Writer Learn how to create a simple report with Report Painter Explore helpful hints and information on the Report/Report Interface, formula variables, and creating your own evaluation structures

Report Development Tools

Chapter 3: Report Painter/Report Writer Review

Learning the Basics of Report Painter/Report Writer


In this chapter you will learn about Report Painter/Report Writer, tools that let you report on data from multiple applications. Before jumping into how you can use Report Painter/Report Writer to create reports, it is important to understand its features and basic organization.

Overview
Report Painter/Report Writer can be used to easily create currency- or quantitytype reports in the R/3 System. Examples of such reports include, financial statements, sales reports, and inventory reports. Earlier releases of the R/3 System were delivered only with Report Writer. Later, the user interface of Report Writer was enhanced and offered to users as Report Painter. As shown in the graphic below, Report Painter adds an easy-to-use graphical interface to the core functionality of Report Writer.

Report Writer

Graphical Graphical Interface Interface

Report Painter

What Is Report Painter?


With Report Painter you can report on data from multiple applications. It uses a graphical report structure which forms the basis for report definition. When defining a report, you work with a structure that corresponds to the final structure of the report. With Report Painters intuitive WYSIWYG approach to report design, you define a report on a form that displays the rows and columns as they will appear in the report output.

What Is Report Writer?


Just like Report Painter, Report Writer lets you report on data from multiple applications. Using elements such as sets, variables, formulas, cells, and key figures, you can create complex reports that meet specific reporting requirements. Note: Since Report Painter provides the core functionality of Report Writer, most users may not need to use Report Writer. A general understanding of Report Writer should suffice for most users.

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

How Is Report Painter Different From Report Writer?


Although there are a few differences between the two tools, both Report Painter and Report Writer share the same execution engine. Since both tools work with the same reporting control tables, you can use either tool to create reports on the configured tables. Here are some of the important differences between Report Painter and Report Writer: Report Painter Page breaks occur only between row elements Allows use of single lines (--) only for over- and underscoring Before 4.0A, authorization groups for report handling are not supported. Refer to OSS note 69090 for a workaround. Starting in Release 4.0A it is possible to maintain the header of a Report Painter report via the menu path: Environment report header. Key figures can only be used in columns Row-detail is restricted to three levels: No explosion, single values, and all levels Report Writer Page breaks occur at arbitrary summation-levels within a report. Allows use of any characters (for example, double-line ==) for overand under-scoring Allows set up of authorization groups for report handling

Key figures can also be used in rows and data selection In addition to the levels supported by Report Painter, you can also select intermediate levels

Copying reports between Report Painter and Report Writer If you want to build a report using features that are only available in Report Writer, then the report must be created in Report Writernot Report Painter. As shown in the graphic on the following page, Report Painter reports can only be changed or displayed using Report Painter. Later, if you want to change a Report Painter report using Report Writer, you must first copy it into a Report Writer report (with a different name) and then modify the copied report. When the report is copied, the necessary sets are automatically generated; you can define a 5-character prefix for the set name. Note: In Release 4.5 you no longer have to define a prefix since the system automatically attaches one to your automatically created sets. The systemcreated set is deleted when you delete the report. Reports written in Report Writer cannot be edited using Report Painter.

Report Development Tools

Chapter 3: Report Painter/Report Writer Review

o e R

R e p o r t P a i n t e r

p y t o p o r t W e p o r t

a r it e r D o C R is p la y r h a n g e e p o r t

D o C R

is p la y r h a n g e e p o r t

R e p o r t W r i t e r

Data tables supporte d

Both Report Painter and Report Writer can be used to report on the following tables and tables types: Evaluation structures set up in the Logistics Information System (LIS). These structures normally begin with an S or ZF. Several different tables and views within the R/3 System can be added as evaluation structures. Note: You cannot add cluster tables, such as BSEG. CCSS is used for Cost Center Accounting (CO-CCA), Internal Orders (COOPA), Activity Based Costing (CO-ABC) and for cost element reports in Project Systems (PS). GLFUNCT is used for functional area reporting in cost-of-sales accounting. GLPCT and GLPCOP are used for Profit Center Accounting (CO-PCA/EC-PCA). FILC is used for Legal Consolidations (FI-LC). COFIT is used for the Controlling Reconciliation Ledger (CO-CEL). ZZ tables are created for the Special Purpose Ledger (FI-SL). FIMC is used for consolidations in the Enterprise Controlling module (ECLC). GLT0 is used for Financial Accounting (General Ledger) reports by account, company, and business area (FI-GL). KKBC, KKBE, and KKBU are used for the Controlling Product Costing module (CO-Costing). New in Release 4.0A: RWCOOM is used for CO-CCA, CO-OPA and CO-ABC. RWCOOM is used for special standard reports like internal order budget reports, cost center budget reports and cost component reports. Note: RPPS was used for Project Systems (PS). However, it is obsolete and is no longer supported in Release 4.0. In Release 3.x there were only two special reports (6P70 and 6P71) using RPPS. These reports cannot be called directly,

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

but via ABAP reports RKOPLAN0 and RKOPLAN1.

How Is Report Painter/Report Writer Organized?


Report Painter/Report Writer has four main components: Sets: Logical groupings of characteristic values. For example, a cash line on a balance sheet is made up of a set of cash accounts, or an energy product line on an inventory report is made up of a set of the energy products. Variables can also be created which are placeholders for sets, or values within sets. Libraries: Control what characteristics and key figures from a table are available for reporting. Reports: Hold a definition of the rows, columns, and overall data selection. They also include the header and footer texts and layout settings. Report Groups: Can contain one or more reports. The report group is what you executenot the actual report. A report group is generated to create a set of ABAP programs that produce the reports.

Related Terminology
The following is a list of key terms you need to understand when working with Report Painter/Report Writer tools.

Report Definition
A report definition has three main components: Rows: The rows of a Report Painter report contain characteristics that determine how the rows will appear in the report. In the first report example on page 8, materials and material types drive the outcome of the rows, therefore only these characteristics are included in the rows of the report. Columns: The columns of a Report Painter report must have key figures. If needed, columns may also contain characteristics. In the second report example on page 19, plants are shown across the page, which means the plant characteristic is included in the columns as well as a key figure for net value of a billing document. General Data Selection: The general data selection area contains the additional characteristics that should control the data included in the report. In the second example on page 19, you may want to limit the selected data by material group or industry. Since these fields do not affect the outcome of the rows or columns, they are included in the general data selection as additional selection criteria. Any required fields that are not in the rows or columns are also included in the general data selection. In the first example on page 8, ledger, version, and record-type are all required but not included in the rows or columns. Therefore, these fields must be included in the general data selection in order for the report to run. Each table has certain required fields. To check your report for missing fields, choose the Check icon in Report maintenance.

Report Development Tools

Chapter 3: Report Painter/Report Writer Review

Key Figures
Key figures are the currency or quantity buckets for a report. Some examples of key figures include the local currency amount in profit center accounting, the costs bucket in cost center accounting, the net value of a billing line item, and the quantity of materials sold in a sales order.

Characteristics
Characteristics are the fieldsother than currency or quantityneeded to build the report. For example, company code, plant, sales organization, G/L account, cost center, or period. In a balance sheet report, G/L accounts probably appear in the rows of your report. In a customer sales report, customers are likely to appear in the rows of the report.

How to Access Report Painter/Report Writer?


To access Report Painter, choose the following menu path from the SAP main menu: Information systems Ad hoc reports Report painter Report Writer functions can be accessed from within Report Painter. To access Report Writer, choose the following menu path from the SAP main menu: Information systems Ad hoc reports Report painter Report Writer.

How Does Report Painter Differ from Other Reporting Tools?


With the exception of row titles which have text fields, Report Painter/Report Writer reports display numerical fields only (for example, dollar and quantity fields). This is not a requirement for ABAP Query and typical line item reporting tools, which can display arbitrary text columns. The printed Report Painter/Report Writer reports appear much the same way on paper as they do on screen. In contrast, the Drilldown reporting tool produces a different output format. Drilldown is an online analytical tool which can be used to drilldown to different levels of detail but is infrequently used for printing. For more information, see chapter 4. Report Painter/Report Writer reports are hierarchical and take advantage of configured hierarchies (for example, with cost center hierarchies). You can also execute Report Painter/Report Writer reports from each level within a hierarchy. Report Painter/Report Writer reports can handle multiple currency/quantity units within a single column. Report Painter/Report Writer is well-suited to handle reports which require mass production. For example, Report Painter/Report Writer is a particularly effective tool for creating month-end reports.

What Are the Prerequisites?


Table: You must know the table you need for the report as well as the data within the table. Every table has characteristics and key figures, or evaluation structures that are required for a report. Each tables
6 Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

characteristics and key figures are different. For example, in the Special Ledger the key figures are based on currency: transaction, local, and group. In Cost Center Accounting structure CCSS, the key figures are based on currency and the type of cost: cost, quantity, statistical quantity, and variances. Sets: You will need to build sets that include the values for the characteristics that are needed for your report. Although the values can be directly entered into the report, it is recommended that you use sets. Sets can be used in multiple reports because when values change, only the sets are changed and not each individual report. As an example, cost center hierarchies (groups) are sets and can be used directly (as with profit center groups). The same holds true for cost elements, activity types, statistical key figures, orders, and business processes (you do not have to create technical sets for these characteristics in order to use Report Painter). Library: You must create a library for the table or evaluation structure. Most tables supported by Report Painter/Report Writer have one or more libraries you can use. When creating evaluation structures in the Logistics Information System, the system creates a library beginning with a 2. Since the Special Ledger is not delivered with the libraries, you will need to create a library on each new special ledger table.

Creating a Report with Report Painter


The main steps in creating a report are shown in the graphic below:

Report Development Tools

Chapter 3: Report Painter/Report Writer Review

Deerm eth ta leyoune dfor yourrep et rmin he ab ee r port D te inet e t bleyoun edfor you re ort

Findor creaealibra for th ta le d at rary he ab Fin or cre tealib ry for t e t ble

Findor creaereq iredset for yourrep s d at qu d ts r port Fin or cre tere uire ses for you re orts

4Traindor createvariables le? thefields inyour report Fine or cre t va b sfor t efie s inyou re ort Fin dEm loye Avalebfor h ld d r p pa e e ria ila 5

Creaeyourrep at r port Cre teyou re ort

Addyourrep toarep grou d r port o port roup Ad you re ort t are ort g p

In this section you learn how to create the following two reports with Report Painter: Profit Center Accounting report Billing report For these sample reports, you should focus on the tables that correspond to the SAP application areas you are working with. For example, if your expertise is PCA (Profit Center Accounting), you should work with table GLPCT. Take a few minutes to familiarize yourself with the scenario and the desired report. For more information, see page 3-4. The examples shown in this section were created in Release 4.0B.

Example 1: Gross Profit Margin Report


Bungee Corporation wants to use Report Painter to create a Gross Margin Report. This Profit Center Accounting report will use data table GLPCT. The desired PCA report displays the gross margin for each profit center. The following general data selection values were used: Fields version (0), Record type (0), Period (1-12), Company code (3000), Profit center (3010N999), and Ledger (8A).

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

Below is an illustration of the completed gross margin report.

The rows in this report list the G/L accounts and the columns contain the current as well as prior years (with the company code currency key figure).

Report Development Tools

Chapter 3: Report Painter/Report Writer Review

Guided Tour

Step 1: Determine the Table


Before you can start creating the report, you must select the table you need to use. In this example, we use table GLPCT in Profit Center Accounting.

Step 2: Find the Library


Select the library you want to use for the table chosen in step 1. If necessary, choose the following menu path to create a library: Information systems Ad hoc reports Report painter Report Writer Libraries Create. As shown in step 5, we use an existing library 8A2 for this report.

Step 3: Create Sets


Create required sets for your report. To create a set, choose: Information systems Ad hoc reports Report painter Report Writer Set Create. Note that this step is not necessary for this sample report.

Step 4: Create Variables


Create any variables for the fields that must be entered before the report is executed. To create a variable, choose: Information systems Ad hoc reports Report painter Report Writer Variable Create. Note that this step is not necessary for the sample report.

Step 5: Create Report


1. From the SAP main menu, choose Information Systems Ad hoc reports Report painter 4 Report Create. 2. In Library, enter the name of the library to be used for the report (for this example, we use 8A2). 3. In the Report field, enter a name for your report and a short text description. 4. Choose Continue.
2 3

10

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

To help you better understand how to create a report in Report Painter, this step has been divided into the following substeps: Define the rows Define the columns Define the general data selection
Define Rows

1. When defining the rows of a report, notice the Lead column at the top of the rows. Report Painter refers to the rows of a report as the Lead column. You can type over this with your own description. 2. To start defining the rows, double-click on Row 1.
1 2

3. In Row 1: Choose Characteristics, select the desired characteristics. For this example, select Account number from the list of available characteristics. 2. Choose Enter to continue.

3. Enter the account number(s) you want to include in the row definition. Either enter to/from values or a group (set). See Tips&Tricks on page 3-12 for more information. 4. Choose Enter.

Report Development Tools

11

Chapter 3: Report Painter/Report Writer Review

5. Enter a name for the row you are defining. In this example, Row 1 is defined as Revenue. 6. Choose Enter.
7

You have now defined the first row. Repeat steps 1-8 shown above to 8 add the second row titled Cost of Goods Sold (not shown here). For Row 2, use accounts 400000490000. 9. In the Report Painter: Create Report screen, double-click on Row 3. 10.Select Formula as the row element type. 11.Choose Enter. 12.Enter the formula for Row 3. You can either type it in or use your mouse and the formula components buttons. If you type the formula, do not forget the spaces. In this example, Y001 and Y002 represent Revenue and Cost of Goods Sold respectively. 13.Choose Enter. 14.In the popup screen (not shown here), enter the text Gross Margin. You have now defined the three rows (Revenue, Cost of Goods Sold, and Gross Margin) you will need for this report.
10 11

12

13

12

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

Creating a set Instead of separately defining each row, you can also create a set to save you time. The set you use in a report row is referred to as a row block and may consist of one or more physical rows. If you create a basic set containing account numbers as a row block, then the system automatically creates a physical row for each account number in the set. In this example, you could have skipped steps 5 through 14 simply by creating a basic set called Gross Margin in step 3. This set (row block) would include the account numbers for Revenue (800000) and Cost of Goods Sold (400000-490000). The system automatically generates a physical row for Revenue and Cost of Goods Sold without requiring you to define it from scratch. To do this, you must set the explode option to explode or single values. After that, one will automatically get one line for each account, not 2 lines for each single value (800000) and the interval. You will only get 2 lines if the standard layout parameter form print is setbut this is not the default setting. For more information on how to use sets, refer to the online documentation in the R/3 Library.
Define Columns

1. Double-click on the first column, Column 1. 2. In the Select Element Type window, select Key Figure with characteristics. 3. Choose Enter.
1

2 3

4. In the Key figures window, select Amount in company code currency. 5. Choose Enter.

Report Development Tools

13

Chapter 3: Report Painter/Report Writer Review

6. In the Choose Characteristics window, select Fiscal Year as the desired characteristic for column 1. 7. Choose Enter.
6

If you want to be prompted for the fiscal year at the time of running the report, you must make this a variable instead of a value. 8. Place your cursor in the From 10 value field and choose Variable on/off. 9. Select from the list of available variables or enter a variable for Current year. 10.Choose Enter. 11.Enter the texts for the column header. 12.Choose Enter. Column 1 has now been defined for your report.
12 11 8

Since the following steps are similar to those shown above, they have not been pictured in this guided tour. 13.Define column 2 (Prior Year): You can define column 2 either by repeating steps 1 through 12, or by copying columns. For column 2, choose Prior year as the desired variable. 14.Define column 3 (Variance): Enter a formula that calculates the difference between column 1 (current year) and column 2 (prior year). The column text should read Variance. Adding a column or formula is similar to adding a row formula. Follow steps 10 through 13 shown in the section Define Rows. You have now defined the three columns (Current Year, Prior Year, and Variance) needed for your report.

14

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

General Data Selection

Now that you have defined the rows and columns, you are ready to enter the general data selection. 1. From the menu on the Report Painter: Create Report screen, choose Edit General data selection Display/Change. 2. Select the fields to add to the general data selection. 3. Choose Enter. 4. Enter the values for each field. The standard ledger for PCA is 8A.The U.S. company code in IDES is 3000. 5. In the Profit center field, we want to include a set variable so that we can enter the profit centers or profit center group when executing the report. Place your cursor in the group field for the profit center. 6. Choose Variable on/off. 7. Enter the variable name 8A-PC-1 in the group field. 8. This is a year-to-date report, so all 12 periods are in the range. The standard Version in PCA is 000 and the Record type for actual dollars is 0. 9. Choose Enter. 10.Choose Edit General data selection Variation (not shown here) 11.To create multiple lists for the characteristics, select Explode. 12.Choose Enter.
12 9

4 4

5 7 8

11

Report Development Tools

15

Chapter 3: Report Painter/Report Writer Review

Your report is now ready. 13.Choose Save to save the report. 14.To go to the display mode of the report, choose Report Display.

14

13

15.Make sure the correct Library and Report names have been selected. 16.Choose Continue.
16 15

17.Review the report display. 18.To execute the report, choose Report Execute.

18

17

You need to display the report before you execute it so that you can later change the report layout directly from the report list.

16

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

You are prompted to include the report in a report group. 19.Choose Yes.
19

20.Enter the name of a report group. It must be four characters long and start with a letter. 21.Choose Enter.
20 21

22.Enter the variables used to execute the report. We will execute the report for fiscal year 23 1998 and profit centers 3010 through N999. 23.Choose Execute.

22

Report Development Tools

17

Chapter 3: Report Painter/Report Writer Review

Change Layout

1. After executing the report, add the headers and footers while you are still viewing the report. Since there is no automatic centering, text blocks are easier to work with at this point. From the report choose Settings Texts Headers (or Footers). 2. Enter the title of the report and any text such as Date:, Time:, and so on. 3. To add the variables for the report, place your cursor where the variable should start, then click the Standard variables button. Select the variable by double-clicking on it. The variable will be included in the header. 4. To include the profit centers in the report, enter Profit Center, then click your cursor where the profit center is to be inserted. 5. Choose Characteristics. Select the profit center characteristic, the text type is Value, and the value is Value/Group. 6. Choose Save to save the headers. Layout settings

6 2

To change the layout settings in the report, choose Settings Layout. There are six layout screens to choose various settings such as the number of decimal places, column width, text column width, and rounding. Review each screen and make the necessary changes. To prevent report users from making permanent layout changes, deselect the Change allowed during execution field in the Layout: Page/Control screen. You have now successfully created a report in Report Painter!

18

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

Example 2: Billing Report


Bungee Corporation needs a billing report which is built on an evaluation structure in LIS. The structure includes characteristics and key figures from tables VBRP (Billing line item table) and MARA (Client-level material master table). These tables were combined into a view which was then used to build the evaluation structure. Shown here is the final output of the billing report we are about to create. This report is a billing report of all materials by material type for each plant. The dollar values are based on the net value of each billing line item. The rows of the report contain materials and material types, and the columns contain plants and the net value key figure. The general data selection contains the sales division (01-99) and industry (00-99). Note that this report is built on a nonstandard evaluation structure.

Note: Before you start with this example, you may want to review LIS Evaluation Structures discussed on page 27. It describes how to create a view that combines tables and creates an evaluation structure.

Report Development Tools

19

Chapter 3: Report Painter/Report Writer Review

Guided Tour

1. From the SAP main menu, choose Information Systems Ad hoc reports Report painter Report Create. 2. In Library, enter the name of 4 the library (for example, 2AF) to be used for the report. 3. In Report, enter the report name and a description. 4. Choose Continue.

2 3

5. When defining the rows of the report, notice the Lead column at the top of the rows. Report Painter refers to the rows of a report as the lead column. You can type over this with your own description. 6. To start defining the rows, double-click on Row 1.
5 6

To insert a row between two existing rows, select the lower row and choose Insert.

20

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

8. Select the characteristics to include in the first row of the report. 9. Choose Enter.
8

10.Enter the values for the Material field and the Material type field. If you have built a set in advance, enter the set name in the group field. Note: You may use the asterisk 12 (*) to specify all values for material and material type. To specify the empty value/space/blank, you may use #. 11.To be prompted to enter the field value at the time of report execution, place your cursor in either the value field for a value variable (enter one value only) or in the group field for a set variable (enter one or more values). Then, choose Variable on/off. 12.Choose Enter. 13.Enter the row heading. Remember, this row totals all values entered in the section above for material number and material type. 14.Choose Enter.
13 11

10

14

Report Development Tools

21

Chapter 3: Report Painter/Report Writer Review

15.To explode the row-detail and view the individual material numbers and material types, select the row. 16.Choose Explode. 17.Select Explode for Material type to view the individual values as well as the totals. Turn on Sing. Val option for Material to get all the individual material numbers. This selection for Material type will give you the subtotals you want. 18.To control the sort sequence of the fields in the row, review the number in the checkbox to the left of the field. Material should be sorted first and Material type second. 19.Choose Enter. You have defined the rows and are now ready to move onto the columns. 20.Double-click on Column 1.
15 17 19

16

18

20

22

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

21.Select the Key Figure with characteristics option. 22.Choose Enter.

21 22

23.Select the Net value key figure. 24.Choose Enter.


23

24

25.Select Plant to include plant in the columns of the report. 26.Choose Enter.

25

26

27.In Plant, enter the plant(s) to be included in the first column of the report. 28.Choose Enter.
28

27

29.Enter the column header text for the column. 30.Choose Enter.

29

30

31.You can enter column 2 by repeating steps 22 through 30 (and enter plants 3100 and 3200), or you can copy columns.

Report Development Tools

23

Chapter 3: Report Painter/Report Writer Review

32.To calculate the Total column, you must enter a formula. Double-click on the next available column and select 32 Formula. 33.Choose Enter. 34.Enter the formula to total the first three columns of the report. You may type in the formula or use the mouse to click on the formula components at the bottom of the screen. If typing in the formula, do not forget the spaces! 35.Choose Enter.
33 34

35

36.To enter the general data selection of the report, choose Edit Gen. data selection Display/Change. 37.Select the characteristics you 37 want to include. 38.Choose Enter.

38

24

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

39.Enter the values to be included in the report for Division and Industry sector. 40.To enter multiple ranges or multiple single values for one of the fields, place your cursor in the from or to fields. 42 Choose the More icon. 41.If a field should be a variable, place the cursor in the field and choose Variable on/off. 42.Choose Enter. 43.Save the report. 44.Go to the display mode of the report: Report Display. 45.Choose the Continue button on the display screen. 46.To execute the report, choose Report Execute. A window prompts you to include the report in a report group. Choose Yes. 47.Enter the name of the report group. 48.Choose Enter. A window prompts you to create the report group if it does not exist. Choose Yes to automatically create and generate the report group.

39

41

40

47 48

49.Choose Execute to run the report.

Report Development Tools

25

Chapter 3: Report Painter/Report Writer Review

50.After executing the report, add the headers and footers while viewing the report. From the report, choose Settings Texts Headers (or Footers). 51 51.Enter the title of the report and any text such as Date:, Time:, Report:. To add variables for the report, place your cursor where the variable should start then choose Standard Variables. Select the variable by double clicking. The variable will appear in the header. All titles can also be entered as text type description. 52.Choose Save.

52

53.To change the layout settings in the report, choose Settings Layout. There are six layout screens containing various settings such as the number of decimal places, column width, text column width, and rounding. Make necessary changes and save your report. Your billing report is now ready.

26

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

Understanding the Report List


After executing a Report Painter report, there are several additional functions you can perform on the output: Sort on each column. Highlight rows that meet the threshold criteria, for example any amount greater than 6,000. Drill down from any line item. Drilldown can access ABAP programs, transaction codes, ABAP queries, Drilldown reports, or other Report Painter/Writer reports. Launch SAP Graphics. Send the report through SAP mail. Save as an extract to be brought up later. Download output to Microsoft Excel for further processing.

Getting the Most from Report Painter/Report Writer: Tips & Tricks
LIS Evaluation Structures
A common misconception among users is that Report Painter/Report Writer only supports FI-CO applications. However, the Report Painter/Report Writer tool can also be used against user-defined evaluation structures created in LIS. These structures can be created on many of the tables in the R/3 System, allowing Report Painter/Report Writer to be used across most SAP applications. Adding your own evaluation structures Make sure you have checked all the standard tables and LIS structures and are certain that the report cannot be created using one of these standard options. The Report Painter/Report Writer tool works with system-generated code. Reading detailed line item tables without additional indexes to help with performance can cause performance problems! Most standard tables are summarized and contain a fraction of the data in the line item tables; these

Report Development Tools

27

Chapter 3: Report Painter/Report Writer Review

tables should be used whenever possible. Below is an example of how to add an evaluation structure in LIS using a user-defined view.
Guided Tour

1. From the SAP main menu, choose Logistics Logistics controlling Logistics information system Flexible analyses Evaluation structure Create. 2. Select the application for which you are building the evaluation structure. Note that this is for reference purposes only. 3. Enter the name and description of the new evaluation structure. The structure must begin with a ZF. 4. Choose DD table ref to continue.

4 2 3

Using views In the next step, a view is used as the data dictionary reference table. Views should only be created when all other options have been exhausted. It is also recommended that you check with an experienced basis/tools consultant before creating the new view. To create a view in SAP, choose Tools ABAP Workbench Dictionary. Enter the name of the new view beginning with a 'Z'. Select the View option and Create. 5. Enter the data dictionary table from which you want to build the evaluation structure. This choice may be virtually any table or view in the data 6 dictionary with the exception of cluster tables and tables
28

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

without key figure fields. ZZ_BILL is a view that combines tables VBRP and MARA. 6. Choose Enter. In the next step, the system determines the classification of fields from the table or view as characteristics or key figures. This is not configurable. Most currency and quantity fields are considered key figures while the other field types are considered characteristics. 7. When you first enter this screen, the Characteristics and Key Figures columns will be empty. To select the characteristics from the data dictionary table or view to be used in the evaluation structure, choose Characteristics. Select the fields from the list and copy them into the evaluation structure definition. 8. To enter the key figures from the data dictionary table or view to be used in the evaluation structure, choose Key Figures. Select the key figures you want from the list and copy them into the evaluation structure definition. 9. Choose Back. A window prompts you to save and generate the evaluation structure. When the structure is generated, it also adds the structure to the Report Painter/Writer control tables and creates a library for reporting. The library name will begin with the number 2.

Report Development Tools

29

Chapter 3: Report Painter/Report Writer Review

Report/Report Interface
Report Call or Report/Report Interface allows for drilldown functionality from a report group. Remember that a report group contains one or many reports and is executed using Report Painter/Report Writer. All reports within the report group have access to the Report/Report Interface setup in the report group. Report Calls may also be assigned to a library. This means all reports created for that library have access to the reports/transactions that are assigned to the Report/Report Interface. To set up the Report/Report Interface, follow these steps: 1. To maintain a report group: Information Systems Ad hoc reports Report painter Report Writer Report group Change. 2. To maintain a library: Information Systems Ad hoc reports Report painter Report Writer Library Change. 3. Enter the name of the report group or library that you would like to add report call capability to. Choose Header. 4. From the Header screen, choose the Report/Report Interface button. 5. If any reports or transactions have been assigned to the report group or library, they will show up in the Report assignments list. 6. To add additional reports or transactions, choose Insert. 7. To view the technical name of the report or transaction, choose Tech name on <-> off.

8. When inserting a new report, the system automatically assumes you wish to add a report of the same type. In the example, it assumes report group because we are adding reports to a report group. To add a different type of report, choose Other report type.

30

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

9. Double-click on the type of report you would like to add to the Report/Report Interface.

10.In the example below, we are adding a transaction code. Transaction code FB03 is an FI document display transaction. This addition means you will be able to drill down to display an FI document. Note that there must be an FI document number and company code available from the sender report for this drilldown to be successful! 11.Choose Enter. 12.Choose Save to save the new report assignment.

10 11

Background on Using the Report/Report Interface


Report Writer allows you to mark data on a report output and call up another report that would select data based on what was marked in the calling report (drilldown). In Release 3.0 and later there is a new standardized crossapplication report/report interface.

Report/Report Interface
This interface spans applications by automatically converting field names and values. Example: A Report Writer report for an FI-SL table can directly call a Report Painter report from the CO module (Table CCSS). The interface converts field

Report Development Tools

31

Chapter 3: Report Painter/Report Writer Review

names (for example, G/L account RACCT to cost element KSTAR) and values (for example, get controlling area CCSS-KOKRS from company code GLT1BUKRS). When calling an ABAP program, the interface retrieves the selection parameters of the program and automatically fills these parameters from the selected data of the sender report. This way any program can be called without the need to adapt the program for the report/report interfaceprovided, of course, that all relevant selection fields are part of the selection parameters of the program. As an example, consider the new line items RGUGLS12 and RGUGLS11. These programs have all the necessary fields as selection parameters. There is no specific coding for the report/report interface. If you need to actively read the interface data, there are a number of function modules available in function group RSTI. The online documentation of function group RSTI gives detailed information on how the report/report interface works and what function modules are available.

Working With Formula Variables


With formula variables you can customize the report selection screen by providing suitable default values. With the help of formula variables you can also create several new types of reports. We will now highlight some of the ways you can work with formula variables: Rolling periods (fixed number of periods up to period p across fiscal years) Display periods of quarter q Display periods of a quarter containing period p Display a variable number of columns for periods p1 to p2 Working with a shifted a fiscal year Creating user exits for formula variables Creating a report with actual/budget values depending on period p General notes on formula variables

Rolling Periods: Fixed Number of Periods up to Period p Across Fiscal Years


Example: A report with 12 periods (see report 0R-FOVAR in library 0R1; copy from Client 000). Create 12 formula variables for the 12 periods and 12 formula variables for the corresponding fiscal year. Create the variables in the order listed in the table on the next page. You can create a data-set entry for each pair of variables or use directly in report definition (Report Painter). The only independent variables are &0R-RP00 (period of last column) and &0R-RY00 (fiscal year of last column). Each pair of variables

32

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

calculates the period and fiscal year of the preceding period. The year will change when going back from period 1. Column
Column 12 Column 11

Period Variable
&0R-RP00 &0R-RP01

Formula
'#S002' IF '0R-RP00' > 1 THEN '0R-RP00' - 1 ELSE 12 IF '0R-RP01' > 1 THEN '0R-RP01' - 1 ELSE 12 IF '0R-RP02' > 1 THEN '0R-RP02' - 1 ELSE 12 IF '0R-RP03' > 1 THEN '0R-RP03' - 1 ELSE 12 IF '0R-RP04' > 1 THEN '0R-RP04' - 1 ELSE 12 IF '0R-RP05' > 1 THEN '0R-RP05' - 1 ELSE 12 IF '0R-RP06' > 1 THEN '0R-RP06' - 1 ELSE 12 IF '0R-RP07' > 1 THEN '0R-RP07' - 1 ELSE 12 IF '0R-RP08' > 1 THEN '0R-RP08' - 1 ELSE 12 IF '0R-RP09' > 1 THEN '0R-RP09' - 1 ELSE 12 IF '0R-RP10' > 1 THEN '0R-RP10' - 1 ELSE 12

Year Variable
&0R-RY00 &0R-RY01

Formula
'#S001' IF '0R-RP01' < '0R-RP00' THEN '0R-RY00' ELSE '0RRY00' - 1 IF '0R-RP02' < '0R-RP01' THEN '0R-RY01' ELSE '0RRY01' - 1 IF '0R-RP03' < '0R-RP02' THEN '0R-RY02' ELSE '0RRY02' - 1 IF '0R-RP04' < '0R-RP03' THEN '0R-RY03' ELSE '0RRY03' - 1 IF '0R-RP05' < '0R-RP04' THEN '0R-RY04' ELSE '0RRY04' - 1 IF '0R-RP06' < '0R-RP05' THEN '0R-RY05' ELSE '0RRY05' - 1 IF '0R-RP07' < '0R-RP06' THEN '0R-RY06' ELSE '0RRY06' - 1 IF '0R-RP08' < '0R-RP07' THEN '0R-RY07' ELSE '0RRY07' - 1 IF '0R-RP09' < '0R-RP08' THEN '0R-RY08' ELSE '0RRY08' - 1 IF '0R-RP10' < '0R-RP09' THEN '0R-RY09' ELSE '0RRY09' - 1 IF '0R-RP11' < '0R-RP10' THEN '0R-RY10' ELSE '0RRY10' - 1

Column 10

&0R-RP02

&0R-RY02

Column 9

&0R-RP03

&0R-RY03

Column 8

&0R-RP04

&0R-RY04

Column 7

&0R-RP05

&0R-RY05

Column 6

&0R-RP06

&0R-RY06

Column 5

&0R-RP07

&0R-RY07

Column 4

&0R-RP08

&0R-RY08

Column 3

&0R-RP09

&0R-RY09

Column 2

&0R-RP10

&0R-RY10

Column 1

&0R-RP11

&0R-RY11

If you only need one column with the total for all periods, create an additional formula column that adds up all period columns. Hide the period columns (In Report Writer, you must set the column width to zero).

Display Periods of Quarter q


Example: A report with three columns for the periods of quarter q.

Report Development Tools

33

Chapter 3: Report Painter/Report Writer Review

Create a value variable &QUARTER for the period and call it Quarter. This will be the independent variable. Create three formula variables for the three periods of the quarter. Column
Column 1 Column 2 Column 3

Period Variable
&QPER1 &QPER2 &QPER3

Formula
'QUARTER' * 3 - 2 'QUARTER' * 3 - 1 'QUARTER' * 3

This example assumes that the first quarter consists of periods 1, 2, and 3, etc. You can use the formula variables &QPER1, &QPER2, and &QPER3 in data-set entries or directly in the column definition (Report Painter). The independent variable &QUARTER is not used directly in the report, only indirectly through the formula variables. When running the report, only the independent variable &QUARTER leads to the input field Quarter on the selection screen. The user is expected to enter quarter 1, 2, 3, or 4.

Display Periods of a Quarter Containing Period p


Example: A report with three columns for the periods of the quarter which contain the period p. Create a value variable &PERIOD for period as the independent variable. The formula variables have to derive the three periods for the quarter containing the period from the independent variable. The following formula variables accomplish the task. Column
Column 1 Column 2 Column 3

Period Variable
&QPER1 &QPER2 &QPER3

Formula
(('PERIOD'-1) DIV 3)*3 + 1 (('PERIOD'-1) DIV 3)*3 + 2 (('PERIOD'-1) DIV 3)*3 + 3

Again, this assumes that the first quarter consists of periods 1, 2, and 3, etc. The DIV operator in the formula denotes division without a remainder (for example, 8 DIV 3 = 2).

Display Variable Number of Columns for Periods p1 to p2


Create 12 formula variables which map the unwanted periods to period 16. If period 16 has data in your system, use any other period with no data (for example, period 17). Refer all formula variables to the independent period variables &PER_FROM (period from) and &PER_TO (period to). These variables will be the independent input variables for the report selection screen. They determine the period range.
34 Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

Column
Column 1 Column 2 Column 3 Column 4 Column 5 Column 6 Column 7 Column 8 Column 9 Column 10 Column 11 Column 12

Period Variable
&PER01 &PER02 &PER03 &PER04 &PER05 &PER06 &PER07 &PER08 &PER09 &PER10 &PER11 &PER12

Formula
IF 1 < '&PER_FROM' OR 1 > '&PERI_TO' THEN 16 ELSE 1 IF 2 < '&PER_FROM' OR 2 > '&PERI_TO' THEN 16 ELSE 2 IF 3 < '&PER_FROM' OR 3 > '&PERI_TO' THEN 16 ELSE 3 IF 4 < '&PER_FROM' OR 4 > '&PERI_TO' THEN 16 ELSE 4 IF 5 < '&PER_FROM' OR 5 > '&PERI_TO' THEN 16 ELSE 5 IF 6 < '&PER_FROM' OR 6 > '&PERI_TO' THEN 16 ELSE 6 IF 7 < '&PER_FROM' OR 7 > '&PERI_TO' THEN 16 ELSE 7 IF 8 < '&PER_FROM' OR 8 > '&PERI_TO' THEN 16 ELSE 8 IF 9 < '&PER_FROM' OR 9 > '&PERI_TO' THEN 16 ELSE 9 IF 10 < '&PER_FROM' OR 10 > '&PERI_TO' THEN 16 ELSE 10 IF 11 < '&PER_FROM' OR 11 > '&PERI_TO' THEN 16 ELSE 11 IF 12 < '&PER_FROM' OR 12 > '&PERI_TO' THEN 16 ELSE 12

Create a basic set for period and enter the 12 formula variables (or enter in the column definition in Report Painter). In the report layout, select the parameter Suppress zero columns. If the from-period is always 1, the formulas simplify to IF p > '&PERI_TO' THEN 16 ELSE p p stands for the period (values 1 to 12). If you only need four columns for quarters 1 to 4, create four additional columns with formulas that add up the necessary columns for each quarter, and also suppress the individual period columns by assigning a column width of zero.

Working With a Shifted Fiscal Year


You can create formula variables that default to the current period and fiscal year taken from the system date. In addition, for a shifted fiscal year, you can create formula variables that calculate the proper period and fiscal year from the system date. The following examples assumes that fiscal year 1999 starts in October 1998:

Report Development Tools

35

Chapter 3: Report Painter/Report Writer Review

Description
Calendar year from system date Calendar month from system date Shifted fiscal year from system date Period from system date

Formula
'#S001' '#S002' IF '#S002' > 9 THEN '#S001' + 1 ELSE '#S001' IF '#S002' > 9 THEN '#S002' - 9 ELSE '#S002' +3

You can define formula variables so that the user enters calendar year and period and these values are internally converted to the fiscal year and period. You need the following formula variables (the example assumes that fiscal year 1999 starts in October 1998): Description
Calendar year from system date Calendar month from system date Shifted fiscal year Fiscal period

Variable
&CYEAR &CPER &FYEAR &FPER

Formula
'#S001' '#S002' IF '&CPER ' > 9 THEN '&CYEAR' + 1 ELSE '&CYEAR' IF '&CPER' > 9 THEN '&CPER' - 9 ELSE '&CPER' + 3

The report can now be defined using the variables &FYEAR and &FPER (fiscal year and period). When running the report, the selection screen has input fields only for the independent variables &CYEAR and &CPER (calendar year and period) with defaults taken from the system date. Upon execution, the calendar values are converted to the fiscal values.

Creating User Exits for Formula Variables


You can only enter formulas directly for numerical fields, for example, period and fiscal year. If you need to create formula variables for nonnumerical fields, or if you cannot solve your problem with a formula, you can create a user exit to be used with a formula variable. User exit A user exit is a programmable link into the R/3 source code. You can link programs to user exits. Linked programs remain available even after you upgrade to a higher version of the R/3 System. As a model for your user exits you can use the formpool RGSVU000. Create your own formpool and enter the name in table T80U (up to Release 3.0B) or T80I

36

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

(Release 3.0C and greater) (overtype RGSVU000 with name of your formpool). OSS note 22878 gives detailed instructions how such an exit can reference the value of other value variables. Also see OSS note 21084 for general instructions.

Creating a Report With Actual/Budget Values Depending on Period p


A report should display actual data for up to period p and budget data beyond. To this end you need a variable which sets the version to 000 (= actual version) for periods less than or equal to p, and for a plan version for periods greater than p. OSS note 22878 describes how to create a such a formula variable. If the report has 12 columns for periods p = 1 through 12, you need to create 12 such variables.

General Notes on Formula Variables


On the report selection screen, Report Painter/Report Writer will only generate input fields for independent variables, that is variables that do not depend on the value of another variable. Always define your variables such that the user only has to enter independent values. Example: A report displays data for the current year as well as the previous year. If you define two independent variables for the current and previous year, respectively, the user has to enter both years on the selection screen. If you define the previous year variable as a formula variable, which derives its value from the current year variable, the user only has to enter the current year. The independent variable need not be used directly in a report. If a report only uses dependent variables, Report Painter/Report Writer figures out the independent value variables and creates input fields for those variables. You can only use explicit formulas in formula variables for numerical fields. For alphanumerical fields you have to define ABAP exits. See OSS note 22878 for more details.

Web Interface to Report Writer Reports


With the internet-enabled Release 3.1G, Report Painter/Report Writer also speaks the language of the Web! You have the following possibilities: Export reports in HTML format from within the R/3 System (also available as of Release 3.0F) Call reports from a web page Call reports via the Web Reporting Browser For details, see the 3.1G Release note and the online documentation for the function modules mentioned there. Also, see appendix D for information about the web reporting browser and the ability to customize HTML reports.

More Report Painter/Report Writer Tips & Tricks


Use Report Groups
When building a report and including it in a report group, consider the performance and processing issues for that report and report group. If you have a series of reports (written on the same table and library) that are always executed at month-end, put these reports in a single report group for
Report Development Tools 37

Chapter 3: Report Painter/Report Writer Review

processing. By grouping them, the system only reads the data from the table once and then produces each report. If the reports were all in individual report groups, the system would read the data once for each report group and then produce the report. Exception: If all the reports are very large they may need to be broken up into smaller groups. Timeout errors may occur if you are executing too many large reports online in a single report group.

38

Reporting Made Easy

Chapter 3: Report Painter/Report Writer Getting the Most from Report Painter/Report Writer: Tips & Tricks

Consider Background Processing


Background processing is often a good way to prevent overuse of system processing. Report groups can be executed in the background and saved as extracts or sent to the print queue for printing. If saved as an extract, the end user can bring the report up online and still have report call, Microsoft Excel, graphics, printing, mail, and download capability. If sent to the print queue, the report may be printed or viewed.

Copy Before You Create


SAP delivers several reports in the CO applications and a few reports in the EC and FI applications. You may want to copy some reports from Client 000 when you first get started. Check out these reports before you decide to build your own reports to see if any of the standard reports match your requirements. If one is close, copy it into a new report and make changes. Changing standard reports Do not change a standard delivered report. All changed reports will be overwritten when you upgrade the R/3 System to a newer release.

Use Variation
Variation is useful in a Report Painter/Writer report. Variation can be performed on any field in the general data selection of a report. This functionality allows an individual report to be created for each level and single value of any field in the general data selection area. If the report contains multiple cost centers and you would like to see an individual report for each cost center as well as the total, variation accomplishes this for you. To use variation for a Report Painter report definition, choose Edit General Data Selection Variation. Note: Variation can be used in combination with the creation of an extract. As of Release 4.0A, the system finds extracts by checking the selection criteria the user filled in on the selection screen. The crucial point is: if there is an extract created with variation, the system will find the extract even if the user specifies any of the nodes or single values that have been part of the varied hierarchy. If the user chooses to display the extract, the user will be directly guided to the users node or value. Before Release 4.0, extracts with variation could only be entered at the top node. Thus, the best scenario is to create an extract with variation for the complete hierarchy by starting a batch job at night. The next day each end user will be able to get their report from the extract just by filling out the selection screen according to their responsibilities (e.g. month-end-reporting scenario).

Report Development Tools

39

Chapter 3: Report Painter/Report Writer Review

Naming Conventions
All customer-defined reporting elements within Report Painter/Writer should begin with an alpha character. Numerical prefixes are reserved for SAP-delivered elements, including libraries, sets, variables, reports, and report groups.

Review
Report Painter/Report Writer is a user-friendly tool for currency and quantity type reports from the R/3 System. You can use Report Painter/Report Writer with various tables, both standard and user-defined. Because of this flexibility, several applications can benefit from the tool. Reports can be printed, downloaded, used with graphics, saved as extracts, mailed via SAP mail, faxed, or simply viewed on the screen. The following steps are necessary to create a report with the Report Painter/Writer tool: 1. Determine the table needed for the report. 2. Find the library for that table, or create one if necessary. 3. Find or create required sets and variables that may be needed for the characteristics in the report. 4. Create the report, including the row and column definitions and general data selection. 5. Add the report to a report group for execution. While viewing the executed report, add texts (headers and footers) and adjust the layout settings. Additionally, the drilldown function can also be used to access reports throughout R/3. Similarly, you can create evaluation structures which let you view data in LIS information structures.

Where to Learn More


The R/3 online documentation for Report Painter and Report Writer: In the R/3 Library for Release 4.0B, go to: AC-Financials FI Financial Accounting FI Special Purpose Ledger, then follow the links for Report Writer. SAP training courses offered by SAP Education and Training: CA705 for Report Painter and CA710 for Report Writer courses.

40

Reporting Made Easy

Potrebbero piacerti anche