Introduction to Report Writer

Fall 1998 RW: Lecture 1

CSU Chico
 SAP AG

Report Writer: Introduction
Copyright 1998- Gail Corbitt Contents of this file are for the exclusive use of the special MINS 298C class dealing with SAP software at CSU Chico for the Fall 1998 semester. Any other use in either electronic or hardcopy form is prohibited without the express written permission of the author. This material is confidential. Do not share it with anyone not enrolled in the class. Lecture #3: Report Writer 1

CSU Chico
 SAP AG

Report Writer: Introduction
 Objectives:

Define Sets

Develop Examples of Sets and How They Are Used
Build a Simple Report

CSU Chico
 SAP AG

Report Writer: Introduction
 Advantages of Report Writer over Report Painter

More Flexible

 

Can Control Level of Detail Better (RP Explode or Not)
Can Modify RP Reports with RW (not the reverse)

Can Put Any Kind of Data in Rows OR Columns (RP has particular things in Columns and other things in Rows)

Extra Functionality

 

More Levels of Reporting More Ways to Label and Use Text

 Disadvantage: Not as User Friendly

CSU Chico
 SAP AG

Converting a Report Painter Report Z-KSTAR 400000 400100 400200 400300 1-C-IP Actual Plan Var. Column Set: REPORT PAINTER Row Set: Selection Set Z-GJAHR Z-PERBL 1996 1 to 12 CSU Chico  SAP AG .

431000 are all Wages  Sets are Dynamically Linked to Report Definitions  Set Types:     Basic Single Dimension Multi-Dimension Data CSU Chico  SAP AG .Report Writer: Sets  Set is the RW Building Block  Set = A Group of Values Having at Least One Common Characteristics  Example: Cost Elements 420000. 422000.

such as Quantities.e.Report Writer: Sets  Definitions of Types:  Basic Set = A Group of Specific Values of a Single Characteristic. Single Dimension Set = A Group of Values Based on Only One Characteristic but it can be Broken Down Further. I. All Cost Elements for Wages. etc. as in Cost Center Group or Cost Element Group Multi-Dimension Set = A Group of Values Based on More Than One Characteristic. Products Sold in the US Through Retail Channel Data Set = Key Figures or the Number Values You Want in a Report. Dollars. etc.    CSU Chico  SAP AG .

Report Writer: Sets  Components to Building Sets  Menu Path: Info systems --> Ad Hoc Reports --> Report Painter --> Report Writer --> Set --> Create. Change. display. Delete Specify:      Set Definition Header Basic Entries Additional Entries (optional special functions) CSU Chico  SAP AG .

Set Definition Set : Set ID : Report Writer table : Set type : Field name Header information : Set text : Ambiguity check : Authorization check : From value : To value Basic entries Additional entries : Special Report Writer functions CSU Chico  SAP AG .

Define the Set Type If Basic or Single Dimension Set you Name the Field from the Reporting Structure CSU Chico  SAP AG .Report Writer: Sets  Set Definition:  Set ID: Up to 12 Character Name (Start with Z)    Link ID to Reporting Structure. CCSS. etc. LIS. I.e. SIS.

.Report Writer: Sets  Basic Entries:  Varies with Set Type   Order That You Enter Things Matters Defines Selection Criteria for Data    What to Retrieve from the Database Based on View (Reporting Structure) and Library (Sub-view) If Entries are Expressed as a Range of Values.  As a Row Set the Default in that the Interval is Discrete Values (Broken Down for Each Value) As a Column Set the Default is in Aggregate  CSU Chico  SAP AG .

Basic Sets: Example OAS-Cost elements Personnel costs Material costs Energy Wages 420000 422000 431000 Salaries 430000 434000 Inc. costs 432000 440000 CSU Chico  SAP AG .

Basic Set: Header Entries H e a d e r Set ID : Wages Field type : Alphanumeric Numeric Character Predefined Data-Dictionary Format Ambiguity check: Authorization group Overlapping values allowed? : GRP1 TABLE TBRG Object Authorization G_800_GSE GRP1 CSU Chico  SAP AG USER Authorization .

00 70. .GXX-WAGES .000.00 25.00 431000 420000 . .500.500. .Basic Set: Basic Entries B a s i c E n t r i e s Set Field No.00 9. . . .422000 CSU *Wages Chico 431000  SAP AG .KSTAR From value XXXXX Wages Cost element To value 002 003 `X` XXXXX XXXXX XXXXX : Selection option for set lines that are to be processed (for example. 001 .00 15. labor costs Part-time salaries Overtime pay GXX-WAGES 20. deleted) together 420000 .000.000. . .422000 Report layout 420000 421000 422000 431000 Direct labor costs Indir.

WAGES Table Set type Ref.Basic Set Components C o m p o n e n t s Set ID : GXX . set) Selection KSTAR Table CCSS Field name : VERSN GJAHR KSTAR KOSTL : Description Version Fiscal year Cost element Cost center CSU Chico  SAP AG . set : : X : CCSS Basic set Field name : (Basic or single-dim.

e. depending on the Reporting Structure You Use Each Node in the Hierarchy Represents a Total in the Report  CSU Chico  SAP AG . I. etc. Co. SD.Report Writer: Sets  Single Dimension Sets  Can Define a Hierarchy of Values Within a Characteristic  Similar to Hierarchy in the Module.

costs Material costs Energy 420000 : 422000 431000 430000 : 432000 : CSU Chico  SAP AG .Single-Dimension Sets OAS Cost elements Personnel costs Wages Salaries Inc.

Dimension Set SD B SD SD SD B B B SD SD B SD SD B  SAP AG B B B SD B SD B B B B B CSU B Chico .Single-Dimension Set: Hierarchy Single .

00 Personnel costs Material costs Wages 420000 421000 422000 431000 Salaries 430000 434000 Inc.000.Single-Dimension Sets: Examples Example OAS Structure: Organizing cost element sets in a hierarchy Set: GXX-OAS-CELM Set: GXX-PERSONNL = Personnel.000.00 10.00 25.00 70.000.000. material. costs PERSONNEL : TOTAL COSTS 20.255.000.000. labor costs Part-time salaries Overtime pay Wages Salary Vacation pay Salaries Sick pay Legal social exp. energy and other cost element sets = Personnel costs Report Layout: Total Costs OAS cost elements 420000 421000 422000 431000 * 430000 434000 * 432000 440000 * ** *** Direct labor costs Indir.00 99.000.00 188. costs 432000 440000 CSU Chico  SAP AG .00 14.000.500.00 15.00 19. Inc.500.00 8.00 85.500.570.500.00 3.00 9.

costs Field: KSTAR Double-click Display contents 001 420000 .422000 CSU Chico  SAP AG 002 431000 .Single-Dimension Sets: Basic Entries B a s i c E n t r i e s Set ID Set text No. 001 002 003 : : GXX-PERSONNL Personnel Set ID GXX-WAGES GXX-SALARY GXX-INCIDENT Set ID entries Set text Wages Salaries Incid.

Single Dimension Sets and/or other MultiDimension Sets If an Error Occurs (Report Runs but Output is not What you Want check the Order of this Type of Set)    CSU Chico  SAP AG .Report Writer: Sets  Multi-Dimension Sets  Uses Multiple Characteristics to Define Data Needed in the Report  Order Determines What is Selected from the Database (like a where clause) Order Determines the Presentation Levels in the Report Can Consist of Basic Sets.

Dimension Set B a s i c E n t r i e s Set ID : GXX-WAG-ADMI X Multi-Dimension Set Set type : Header : Set text Wages / Admin.Defining Multi-Dimension Sets Multi . 001 Set ID GXX-WAGES Set text Wages Field name KSTAR 002 GXX-ADM-CST Amin. No. KOSTL Set ID entries CSU Chico  SAP AG .

Combination of Different Set Types MultiDimension Set Actual/Plan/Periods Data Set Actual total & Plan total SingleDimension Set (Period) Year SingleDimension Set (Period) First Half Basic Set Period 001 002 003 Basic Set Period 004 005 006 SingleDimension Set (Period) Second Half Basic Set Period 007 008 009 Basic Set Period 010 011 012 CSU Chico  SAP AG .

Dollars. I.Report Writer: Sets  Data Sets  Similar to Pre-Defined Columns in Report Painter  Specify Key Figures (Types of Numeric Data. Units. etc.e.) Names Starting with 100 are Supplied by SAP     Copy to Modify F4 Gives you a List of These in SAP Defines What Goes into the Report Cells CSU Chico  SAP AG . Quantity.

Data Sets GXX-ACT-PLAN ISWKG PSWKG Actual costs total (CO currency) Plan costs total (CO currency) Database value fields CSU Chico  SAP AG .

00 80.00 60.000. Accounting Purchasing Cafeteria Salary Personnel dept.000.00 17.000.00 15.000.00 PLAN Total 45.000.000.000.000.00 24.00 22.00 18.000.00 6.00 20.000.00 10.000.000.Data Sets: Example Report The example shows a report with a data set of the following structure: DATA SET ISWKG PSWKG Actual/Plan costs Salaries / Administration 3200 3400 3500 3600 * 3200 3400 3500 3600 Personnel dept.00 CSU * ** Chico  SAP AG .00 175.000.00 40.00 55.000.000.00 11. Accounting Purchasing Cafeteria Vacation pay Salaries ACTUAL Total 50.000.000.000.550.00 5.00 25.550.00 226.00 39.000.00 243.550.00 51.

Defining Data Sets H e a d e r B a s i c e n t r i e s  SAP AG Set ID: Set text: GXX-ACT-PLAN Actual/Plan Costs Set type: X Data set 30-character text description Authorization group No. 001 002 Name in data set ISWKG PSWKG Set line text Actual costs Plan costs : : : CSU Chico .

Data Set Entries (1) Required columns in report Current year Cumulative Total plan Version Variable Current year Cumulative Total actual Version 000 Previous year Cumulative Total actual Version 000 CSU Chico  SAP AG .

Data Set Entries (2) Required columns in report Current year Cumulative Total plan Version Variable Current year Cumulative Total actual Version 000 Previous year Cumulative Total actual Version 000 D A T A F I E L D S W K G DATA SET ENTRY ZCY-PLAN-CUM CSU Chico  SAP AG .

Data Set Entries (3) Required columns in report Current year Cumulative Total plan Version Variable Current year Cumulative Total actual Version 000 Previous year Cumulative Total actual Version 000 D A T A F I E L D S W K G DATA SET ENTRY ZCY-PLAN-CUM ADDITIONAL SET CY-PLCUM CSU Chico  SAP AG .

Data Set Entries (4) Required columns in report Current year Cumulative Total plan Version Variable Current year Cumulative Total actual Version 000 Previous year Cumulative Total actual Version 000 D A T A F I E L D S W K G DATA SET ENTRY ZCY-PLAN-CUM ADDITIONAL SET CY-PLCUM CurYear &CYR CSU Chico  SAP AG .

Data Set Entries (5) Required columns in report Current year Cumulative Total plan Version Variable Current year Cumulative Total actual Version 000 Previous year Cumulative Total actual Version 000 D A T A F I E L D S W K G DATA SET ENTRY ZCY-PLAN-CUM ADDITIONAL SET CY-PLCUM CurYear &CYR Percum 1 .... &PER CSU Chico  SAP AG ...

&PER Valpln CSU Chico  SAP AG 01 ..Data Set Entries (6) Required columns in report Current year Cumulative Total plan Version Variable Current year Cumulative Total actual Version 000 Previous year Cumulative Total actual Version 000 D A T A F I E L D S W K G DATA SET ENTRY ZCY-PLAN-CUM ADDITIONAL SET CY-PLCUM CurYear &CYR Percum 1 .....

...Data Set Entries (7) Required columns in report Current year Cumulative Total plan Version Variable Current year Cumulative Total actual Version 000 Previous year Cumulative Total actual Version 000 D A T A F I E L D S W K G DATA SET ENTRY CYR-PLAN-CUM DATA SET ENTRY CYR-ACT-CUM DATA SET ENTRY ZPYR-ACT-CUM ADDITIONAL SET CY-PLCUM ADDITIONAL SET CY-ACTCUM ADDITIONAL SET CY-ACTCUM Fyear other conditions Perbl Valtyp Versn CSU Chico  SAP AG CurYear &CYR Percum 1 . &PER Valpln 01 Varvers &VERSPLN ...

.. X ZPY-ACT-CUM Prev.Data Set Entries (8) Required columns in report Current year Cumulative Total plan Version Variable Current year Cumulative Total actual Version 000 Previous year Cumulative Total actual Version 000 DATA SET ENTRY ZCY-PLAN-CUM DATA SET ENTRY ZCY-ACT-CUM DATA SET ENTRY ZPY-ACT-CUM Data set *D CYR-PYR-PLCUM LI XX 001 ZCY-PLAN-CUM 002 ZCY-ACT-CUM 003 ZPY-ACT-CUM CSU Chico  SAP AG Predefined columns: Name Short description x ISWKG Total actual x PSWKG Total plan . year act. X ZCY-ACT-CUM Current year act... . . cum. X ZCY-PLAN-CUM Current year plan cum. cum.

KSTAR (field name). or Salaries. Values 420000-422000 and 431000 Basic Set for Salaries: Uses CCSS. Menu Path: Information Systems > Ad Hoc Reports >Report Painter > Report Writer > Set > Create     CSU Chico  SAP AG . and the 2 Basic Sets you created above.Exercise  Create Some Sets to do the Following:  Basic Set for Wages: Uses CCSS. where xxx is your intials and Name is like Wages. In Order to Make Sure Your Names are Unique Use the Naming convention Zxxx-Name. Etc. KSTAR. KSTAR.Report Writer: Sets . Values: 430000 & 434000 Single Dimension Set for Personnel costs: Uses CCSS.

Report Writer: Formulae  Formulae Belong to Sets (Basic or Data Sets only)  Data Used in Formulae are Referenced in single quotes by line number.  Operators are available (see handout)  SAP Delivered Names start with a 1  Your names = &+name (Makes the Formula a Variable)   You can activate and give it a Default Value You can activate and assign a default by user through PID CSU Chico  SAP AG . ‘001’ . I.e.‘002’ subtracts line 2 from line 1.

'002' Set lines 001 ISWKG 002 PSWKG 003 = Insert Formula Complete Set Set: GXX-ACT-PLAN No.Defining Sets: Formulas Set : GXX-ACT-PLAN No. Line text ACTUAL Total PLAN Total B a s i c E n t r i e s 003 Formula in line 003 '001' . 001 002 ID in data set ISWKG PSWKG Line text ACTUAL Total PLAN Total Variance CSU 003Chico '002' = '001' SAP AG . 001 002 ID in data set ISWKG PSWKG Set text: Actual/Plan/Var.

Current year? 2. Formula variable 1GJAHVJ: Internal variable that determines previous year 1GJAHVJ = '1GJAHLJ' .1 CSU Chico  SAP AG .Formula Variables: Example 1 1. Previous year? Default values from system MILLER Formula variable 1GJAHLJ: Systemexit that determines current fiscal year from controlling area and fiscal year variant.

000.00 1.000.Formula Variables: Example 2 Quarter X Salaries / Administration 3200 Personnel dept. Quarter ? Formula variables ZQUPERV: 'ZQUART' * 3 .000.00 226.00 175.000.2 ZQUPERB: 'ZQUART' * 3  SAP AG CSU Chico Value variable ZQUART .00 20. Quarter ? 3.000. Quarter ? 4.00 25.000.000.00 51. Quarter ? 2.00 10.00 40.000.000.000.00 60.000. Accounting Purchasing Cafeteria Vacation pay Salaries Period ZZ to YY 50.00 15.00 6. 3400 Accounting 3500 Purchasing 3600 Cafeteria * 3200 3400 3500 3600 * ** Salary Personnel dept.

Version(s). Project Number.c  Type of Variables:   Value (a Specific Characteristic) Set Variables CSU Chico  SAP AG . Cost Element Groups. Sales Region. Controlling Area. et. Period(s).Variables in Report Writer  Increases Flexibility at Run Time  Defined Once Used Many Times  Example of Good Variables: Fiscal Year.

Defining Set Variables Variable Field Default set Description Variable type Table Authorization group 1KOSET KOSTL Cost center 1-S-KOSTL-AL Cost center group Set CCSS CSU Chico  SAP AG .

.. . Accounting Purchasing Cafeteria 421000 Personnel dept. Accounting Purchasing Cafeteria Set Variable Selection: .Set Variables 1 Multi .. Cost element group  SAP AG 420000 Personnel dept.Dimension Set WAGES Act Plan GXX-CELM-CST &GXX-CEG - GXX-ADM-CST Personnel dept.. Accounting Purchasing Cafeteria : CSU Chico GXX-WAGES .

. Accounting Purchasing Cafeteria 434000 Personnel dept.. Accounting Purchasing Cafeteria : CSU Chico GXX-WAGES GXX-SALARY ..Set Variables 2 Multi .Dimension Set Salaries Act Plan GXX-CELM-CST &GXX-CEG - GXX-ADM-CST Personnel dept. Accounting Purchasing Cafeteria Set Variable Selection: . . Cost element group  SAP AG 430000 Personnel dept..