You are on page 1of 44

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 1-C-IP
400100 Actual

400200 Plan

400300 Var.

400400 Column Set:

REPORT PAINTER

Row Selection Set


Set:

Z-GJAHR Z-PERBL

1996 1 to 12
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, 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

 Definitions of Types:
 Basic Set = A Group of Specific Values of a Single Characteristic, I.e.
All Cost Elements for Wages, etc.
 Single Dimension Set = A Group of Values Based on Only One
Characteristic but it can be Broken Down Further, 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,
such as Quantities, 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 ID
: Report Writer table
Set : Set type
: Field name
: Set text
Header : Ambiguity check
information : Authorization check

: From value
Basic entries
: To value

: Special
Additional
Report Writer
entries
functions

CSU Chico

 SAP AG
Report Writer: Sets

 Set Definition:
 Set ID: Up to 12 Character Name (Start with Z)
 Link ID to Reporting Structure, I.e. CCSS, LIS, SIS, etc.
 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

 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 Salaries Income costs

420000 430000 432000


422000 434000 440000
431000

CSU Chico

 SAP AG
Basic Set: Header Entries

Set ID : Wages
H
Field type : Alphanumeric Predefined
e Numeric Data-Dictionary
a Character Format
d Ambiguity check: Overlapping values allowed?
e
r Authorization group : GRP1

TABLE TBRG

Object Authorization

G_800_GSE GRP1
USER
CSU Chico Authorization

 SAP AG
Basic Set: Basic Entries
B Set . . .GXX-WAGES Wages
Field . . .KSTAR Cost element
a No. From value To value
s
i 001 XXXXX
c
002 XXXXX XXXXX
E 003 XXXXX
n
t `X` : Selection option for set lines that are to be
processed (for example, deleted) together
r
i
e dom
s n
Ra der
Or 420000
420000 .. .. .422000
.422000
GXX-WAGES 431000
431000
Report layout
420000 Direct labor costs 20.000,00
421000 Indir. labor costs 15.000,00
422000 Part-time salaries 9.500,00 420000
420000 .. .. .422000
.422000 431000
431000
431000
CSU Chico
Overtime pay 25.500,00

*Wages 70.000,00
 SAP AG
Basic Set Components
C
o Set ID : GXX - WAGES
m Table : CCSS
p Set type : X Basic set
o Ref. set :
n Field name : Selection
e (Basic or KSTAR
n single-dim. set)
t
s
Table CCSS

Field name Description


:
VERSN Version
GJAHR Fiscal year
KSTAR Cost element
CSU Chico KOSTL Cost center
:
 SAP AG
Report Writer: Sets

 Single Dimension Sets


 Can Define a Hierarchy of Values Within a Characteristic
 Similar to Hierarchy in the Module. I.e. CO, SD, etc. depending on
the Reporting Structure You Use
 Each Node in the Hierarchy Represents a Total in the Report

CSU Chico

 SAP AG
Single-Dimension Sets

OAS Cost elements

Personnel costs Material costs Energy

Wages Salaries Inc. costs

420000 430000 432000


: : :
422000
431000

CSU Chico

 SAP AG
Single-Dimension Set: Hierarchy
Single - Dimension Set

SD

B SD SD SD

B B B SD SD B

SD B SD SD B

SD B B B B B B

CSU Chico
B B B
 SAP AG
Single-Dimension Sets: Examples
Example
OAS Structure: Organizing cost
element sets in a hierarchy
Set: GXX-OAS-CELM = Personnel, material, energy and other cost element sets
Set: GXX-PERSONNL = Personnel costs

Report Layout: Total Costs


420000 Direct labor costs 20.000,00
421000 Indir. labor costs 15.000,00
OAS cost elements 422000 Part-time salaries 9.500,00
431000 Overtime pay 25.500,00

Personnel costs Material costs


* Wages 70.000,00
430000 Salary 85.000,00
434000 Vacation pay 14.000,00
Wages Salaries Inc. costs
* Salaries 99.000,00
420000 430000 432000
421000 434000 440000
432000 Sick pay 8.500,00
422000 440000 Legal social exp. 10.500,00
431000 * Inc. costs 19.000,00
CSU Chico ** PERSONNEL
:
188.000,00

*** TOTAL COSTS 3.255.570,00


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

Display
Display contents
contents

001 420000 - 422000


CSU Chico 002 431000

 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, Single Dimension Sets and/or other Multi-
Dimension 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
Defining Multi-Dimension Sets

Multi - Dimension Set

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

CSU Chico

 SAP AG
Combination of Different Set Types
Multi-
Dimension
Set
Actual/Plan/Periods

Single-
Data Set Dimension
Set (Period)
Year
Actual total
&
Plan total Single- Single-
Dimension Dimension
Set (Period) Set (Period)
First Half Second Half

Basic
Basic Basic
Basic Basic
Basic Basic
Basic
Set
Set Set
Set Set
Set Set
Set
Period Period Period Period
CSU Chico
001 004 007 010
002 005 008 011
003 006 009 012
 SAP AG
Report Writer: Sets

 Data Sets
 Similar to Pre-Defined Columns in Report Painter
 Specify Key Figures (Types of Numeric Data, I.e. Dollars, Quantity,
Units, etc.)
 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
Data Sets

GXX-ACT-PLAN

ISWKG Actual costs total (CO currency)


PSWKG Plan costs total (CO currency)

Database value fields

CSU Chico

 SAP AG
Data Sets: Example Report
The example shows a report
with a data set of the
DATA SET
following structure:

ISWKG PSWKG

Actual/Plan costs
Salaries / Administration
ACTUAL Total PLAN Total
3200 Personnel dept. 50,000.00 45,000.00
3400 Accounting 60,000.00 80,000.00
3500 Purchasing 40,000.00 39,000.00
3600 Cafeteria 25,000.00 24,000.00
* Salary 175,000.00 18,000.00

3200 Personnel dept. 20,000.00 22,000.00


3400 Accounting 15,000.00 17,000.00
3500 Purchasing 10,000.00 11,000.00
3600 Cafeteria 6,000.00 5,550.00
CSU Chico
* Vacation pay 51,000.00 55,550.00
** Salaries 226,000.00 243,550.00

 SAP AG
Defining Data Sets
H Set ID: GXX-ACT-PLAN Set type: X Data set
e
a Set text: Actual/Plan Costs 30-character text description
d
Authorization group
e
r

B
a
s No. Name in data set Set line text
i
c 001 ISWKG Actual costs
002 PSWKG Plan costs
e
n : : :
t
r
i CSU Chico
e
s
 SAP AG
Data Set Entries (1)
Required
Current year Current year Previous year
columns
Cumulative Cumulative Cumulative
in report
Total plan Total actual Total actual
Version Variable Version 000 Version 000

CSU Chico

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

CSU Chico

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

CSU Chico

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

CurYear &CYR

CSU Chico

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

CurYear &CYR
Percum 1 ...... &PER

CSU Chico

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

CurYear &CYR
Percum 1 ...... &PER
Valpln 01
CSU Chico

 SAP AG
Data Set Entries (7)
Required
Current year Current year Previous year
columns
Cumulative Cumulative Cumulative
in report
Total plan Total actual Total actual
Version Variable Version 000 Version 000
D
A
T DATA SET ENTRY DATA SET ENTRY DATA SET ENTRY
A S
W CYR-PLAN-CUM
CYR-PLAN-CUM CYR-ACT-CUM
CYR-ACT-CUM ZPYR-ACT-CUM
ZPYR-ACT-CUM
F
K
I
G
E
L
D
ET

ADDITIONAL SET ADDITIONAL SET ADDITIONAL SET


I-S

CY-PLCUM CY-ACTCUM CY-ACTCUM


LT
MU

Fyear CurYear &CYR


other Perbl Percum 1 ...... &PER
conditions
Valtyp Valpln 01
CSU
VersnChico Varvers &VERSPLN

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

DATA SET ENTRY DATA SET ENTRY DATA SET ENTRY


ZCY-PLAN-CUM
ZCY-PLAN-CUM ZCY-ACT-CUM
ZCY-ACT-CUM ZPY-ACT-CUM
ZPY-ACT-CUM

LI XX
Data set
*D CYR-PYR-PLCUM Predefined columns:
Name Short description
001 ZCY-PLAN-CUM x ISWKG Total actual
002 ZCY-ACT-CUM x PSWKG Total plan
003 ZPY-ACT-CUM . .....
X ZCY-PLAN-CUM Current year plan cum.
CSU Chico X ZCY-ACT-CUM Current year act. cum.
X ZPY-ACT-CUM Prev. year act. cum.

 SAP AG
Report Writer: Sets - Exercise

 Create Some Sets to do the Following:


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

CSU Chico

 SAP AG
Report Writer: Formulae

 Formulae Belong to Sets (Basic or Data Sets only)


 Data Used in Formulae are Referenced in single quotes
by line number, I.e. ‘001’ - ‘002’ subtracts line 2 from
line 1.
 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
Defining Sets: Formulas
Set : GXX-ACT-PLAN Set text: Actual/Plan/Var.

B No. ID in data set Line text


a 001 ISWKG ACTUAL Total
s
i 002 PSWKG PLAN Total
c 003
E
n Formula in line 003
Insert
t '001' - '002'
Formula
r Set lines
i Complete Set 001 ISWKG
e
s 002 PSWKG
Set: GXX-ACT-PLAN
003 =
No. ID in data set Line text

001 ISWKG ACTUAL Total


002
CSU Chico
PSWKG PLAN Total

003 = '001'- '002' Variance


 SAP AG
Formula Variables: Example 1

1. Current year?
Default values
2. Previous year? from system
MILLER

Formula variable 1GJAHLJ: Systemexit that determines current fiscal year from
controlling area and fiscal year variant.

Formula variable 1GJAHVJ: Internal variable that determines previous year


1GJAHVJ = '1GJAHLJ' - 1

CSU Chico

 SAP AG
Formula Variables: Example 2
Quarter X
Salaries / Administration Period ZZ to YY
3200 Personnel dept. 50,000.00
3400 Accounting 60,000.00
3500 Purchasing 40,000.00
3600 Cafeteria 25,000.00 1.
1.Quarter
Quarter??
* Salary 175,000.00 2.
2.Quarter
Quarter??
3200 Personnel dept. 20,000.00
3.
3.Quarter
Quarter??
3400 Accounting 15,000.00 4.
4.Quarter
Quarter??
3500 Purchasing 10,000.00
3600 Cafeteria 6,000.00
* Vacation pay 51,000.00
** Salaries 226,000.00

Formula variables
ZQUPERV: 'ZQUART' * 3 - 2
Value
Valuevariable
variable
ZQUART
ZQUART
CSU Chico
ZQUPERB: 'ZQUART' * 3

 SAP AG
Variables in Report Writer

 Increases Flexibility at Run Time


 Defined Once Used Many Times
 Example of Good Variables: Fiscal Year, Controlling
Area, Period(s), Version(s), Cost Element Groups,
Sales Region, Project Number, et.c
 Type of Variables:
 Value (a Specific Characteristic)
 Set Variables

CSU Chico

 SAP AG
Defining Set Variables

Variable
Variable 1KOSET
Field
Field Cost
Costcenter
center
KOSTL
Default
Defaultset
set 1-S-KOSTL-AL
Description
Description Cost center group
Variable
Variabletype
type Set
Table
Table
CCSS
Authorization
Authorizationgroup
group

CSU Chico

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

Selection:
...
... CSU Chico
Cost element group GXX-WAGES

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

 SAP AG

You might also like