Row and Column Models
Unit Overview
This unit explains how reports having similar row and column structures can be put into row and column models. These models help you define reports in less time. The unit also explains how these models can be used in reports and libraries.
Unit Objectives
After completing this unit, you will be able to: • Create row and column models
Unit Contents
Lesson: Using Row and Column Models ... 83 Exercise 6: Building Row and Column Models ... 85
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
Lesson: Using Row and Column Models
Lesson Overview
This lesson explains how to create row and column models in reports. These models help you define reports in less time.
Lesson Objectives
After completing this lesson, you will be able to: • Create row and column models
Business Example
You work as a financial consultant for XYZ Cement Company. The company needs Cost Center Accounting reports. You need to create these reports using the Report Writer. You realize that most of your reports have the same row and column characteristics. You need to evaluate different methods of defining reports so that you are able to define your reports quickly.
Defining Reports Using Row and Column Models
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
You can store frequently used row and column structures in row and column models. You can copy row models and column models into a report. This is the quickest way to define a report.
Figure 42: Model Rows and Columns
Row and column models must be created for libraries. These can only be used in reports in the same library.
If you want to use the same models in different libraries, you have to copy them. Note that you can only copy models form one library to another if the target library has the required fields.
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
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. Name your column model Z##-APV. Use your library Z##.
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.
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
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. Name your column model Z##-APV. Use your library Z##. a) Choose Model → Create.
Library: Z##
Copy from: 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 key figure, a basic key figure with
characteristic(s) column, or a formula column.
Save the model.
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
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 Model → Create. Library: Z##
Copy from: 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, enter the value OAS_PRIM in the Group field. In the Enter Texts screen, define row text. Copy this text to the medium and long text fields. Click Confirm or Enter.
3. Click row 1, choose Edit → Rows → Expand. 4. Save the model.
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##.
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
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.
a) Instructions for defining the report Z4##-001 From the main SAP System menu, choose:
1. Information Systems → Ad-hoc Reports → Report Painter
2. Report → Create
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.
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.
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
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.
Use the following table for the characteristic and its associated variables.
Char. Variable
Period 1PERIV (From Period)
1PERIB (To Period)
Fiscal year 1GJAHR
Cost center 1KOSET
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
2. Report Writer → Report Group → Create
Rep. Group: Z4## Library: Z##
3. Click Header or Enter. Enter a description for the report group. 4. Click Reports. Enter Z4##-001 in the Report field.
5. Save the report group.
Execute the Report Click Generate. Double-click Execute.
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
Use the following table for the Selection values:
Fiscal year Current year
Period 1 to 12
Cost Center Group H1010
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
Lesson Summary
You should now be able to:I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
Unit Summary
You should now be able to:I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
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.
I n t e r n a l U s e S A P P a r t n e r O n l y
I n t e r n a l U s e S A P P a r t n e r O n l y
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.