Defining Reports Using Row and Column Models
Exercise 6: Building Row and Column Models
Exercise Objectives
After completing this exercise, you will be able to:
• Create row and column models
• Integrate models into reports
Business Example
You realize that most of your reports have the same or at least similar row or column structures. Therefore, you look for ways to define your reports more quickly.
Task:
Since many of your reports compare actual costs, planned costs, and variances, you create a column model to help you create your reports more quickly.
1. Create column model Z##-APV. Use your library Z##. Include Actual, Plan and Variance columns.
2. In addition, many of your reports itemize the cost elements within the cost element group OAS_PRIM. Build a row model based on OAS_PRIM.
Name the row model Z##-ELEMENT.
3. What Explode level did you use to itemize the cost element accounts in OAS_PRIM?
4. How will you integrate your models into your report? That is, what menu path will you use?
5. Build a new report Z4##-001 using your new model. This report will detail the Actual, Plan, and Variance in costs for those cost element accounts in OAS_PRIM. This report should itemize the accounts in OAS_PRIM. Assign this report to the report group Z4##.
The general selection criteria that will apply throughout the report are the cost center group H1010, the current fiscal year, the periods 1 - 12, and the controlling area 1000. As these general selections are to be kept variable, use the same variants as given in Task 3 in the exercise Using Hierarchies: Sequence (Sort). For the characteristic cost center, use set variable 1KOSET.
The controlling area contains the constant value 1000.
Create a report group Z4## with the Report Writer and insert your report.
Generate and execute your report group.
Solution 6: Building Row and Column Models
Task:
Since many of your reports compare actual costs, planned costs, and variances, you create a column model to help you create your reports more quickly.
1. Create column model Z##-APV. Use your library Z##. Include Actual, Plan and Variance columns.
a) Choose Information System → Ad Hoc Reports → Report Painter → Model → Create or transaction GRR4.
Library: Z##
Model: Z##-APV
Description: APV Col Model Structure: Column model
Click Create to proceed to the Create Model screen.
Proceed as you would normally in defining a report column.
Double-click each column to define it as a predefined key figure, a key figure with characteristic(s) column, or a formula column.
Save the model with .
2. In addition, many of your reports itemize the cost elements within the cost element group OAS_PRIM. Build a row model based on OAS_PRIM.
Name the row model Z##-ELEMENT.
a) Choose Information System → Ad Hoc Reports → Report Painter → Model → Createor transaction GRR4.
Library: Z##
Model: Z##-ELEMENT Description: Celem row model Structure: Row model
Click Create to proceed to the Model screen.
Proceed as you would normally when defining report rows.
Double-click the first element.
1. Select a cost element in the Available Characteristics dialog box.
Click Move selected to left.
2. In the Characteristic Values pane, select the hierarchy flag and enter the value OAS_PRIM in the From field. Click Confirm . 3. Click row 1, choose Edit → Rows → Explode. Select single
values and Confirm.
4. Save the model with .
3. What Explode level did you use to itemize the cost element accounts in OAS_PRIM?
a) Single values
4. How will you integrate your models into your report? That is, what menu path will you use?
a) From the report definition, choose:
Edit → Column → Get Column Model Edit → Row → Get Row Model
5. Build a new report Z4##-001 using your new model. This report will detail the Actual, Plan, and Variance in costs for those cost element accounts in OAS_PRIM. This report should itemize the accounts in OAS_PRIM. Assign this report to the report group Z4##.
The general selection criteria that will apply throughout the report are the cost center group H1010, the current fiscal year, the periods 1 - 12, and the controlling area 1000. As these general selections are to be kept
Continued on next page
variable, use the same variants as given in Task 3 in the exercise Using Hierarchies: Sequence (Sort). For the characteristic cost center, use set variable 1KOSET.
The controlling area contains the constant value 1000.
Create a report group Z4## with the Report Writer and insert your report.
Generate and execute your report group.
a) Instructions for defining the report Z4##-001 From the main SAP System menu, choose:
Information Systems → Ad-hoc Reports → Report Painter → Report
→ Create or transaction GRR1.
Library: Z##
Report: Z4##-001 Description: Models
Click Create to access the report definition environment.
Define Rows
Choose Edit → Rows → Get Row Model. Select your row model, Z##-ELEMENT.
Define Columns
Choose Edit → Columns → Get Column Model. Select your column model Z##-APV.
Hint: If there is only one model, the system selects it automatically.
Define General Data Selections 1. Choose Edit → Gen. data selection.
2. In the Available Characteristics pane, choose the characteristics that are to be included in the general parameters of the report (see table below). Click Move selected to left.
3. In the Characteristic Values screen, instead of entering permanent values for each characteristic, click Variables On/Off to activate the variables. Then, select a variable to hold the user values. For the Cost Center characteristic select the hierarchy flag prior to selecting the
Variables On/Off.
Use the following table for the characteristic and its associated variables.
Char. Variable
CO Area 1000 (not a variable)
Period 1PERIV (From Period)
1PERIB (To Period)
Fiscal year 1GJAHR
Cost center 1KOSET
Select confirm. You have now defined the general data selections.
Check and Save the Report
1. Check the report for any errors or missing characteristics, by choosing Report → Check or use Check or F6.
2. Save the Report via Report → Save or use Save or CTRL+S.
Assign the Report to a Report Group From the main SAP System menu, choose:
1. Information Systems → Ad hoc reports → Report Painter → Report Writer → Report Group → Create or transaction GR51.
2. Report Group: Z4##
Library: Z##
3. Click Header Enter a description for the report group.
4. Click Reports. Enter Z4##-001 in the Report field.
5. Save the report group with .
Execute the Report Click Generate.
Continued on next page
Select Execute twice.
Use the following table for the Selection values:
Fiscal year Current year
Period 1 to 12
Cost Center Group H1010
If necessary enter Version 0 and Valuation 0 Click Execute.
Lesson Summary
You should now be able to:
• Create row and column models
Unit Summary
You should now be able to:
• Create row and column models
Test Your Knowledge
1. You can only copy models form one library to another if the target library has the required fields.
Determine whether this statement is true or false.
□ True
□ False
2. The quickest way to define a report is to copy and into a report.
Fill in the blanks to complete the sentence.
Answers
1. You can only copy models form one library to another if the target library has the required fields.
Answer: True
You can only copy models form one library to another if the target library has the required fields.
2. The quickest way to define a report is to copy row models and column models into a report.
Answer: row models, column models