Introduction to Report Writer

advertisement
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
400000
Actual
400100
Plan
400200
Var.
400300
Column Set:
REPORT PAINTER
Row
Set:
Selection Set
Z-GJAHR
CSU
Chico
 SAP AG
Z-PERBL
1996
1 to 12
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
: Set ID
: Report Writer table
: Set type
: Field name
Header
information
: Set text
: Ambiguity check
: Authorization check
Basic entries
: From value
: To value
Additional
entries
CSU
Chico
 SAP AG
: Special
Report Writer
functions
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
Wages
Salaries
Inc. costs
420000
422000
431000
430000
434000
432000
440000
CSU
Chico
 SAP AG
Energy
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
Basic Set: Basic Entries
B
a
s
i
c
Set
Field
No.
. . .GXX-WAGES
. . .KSTAR
From value
001
XXXXX
002
XXXXX
E
n
t
r
i
e
s
003
XXXXX
`X`
Wages
Cost element
To value
XXXXX
: Selection option for set lines that are to be
processed (for example, deleted) together
420000 . . .422000
Report layout
420000
421000
422000
431000
Direct labor costs
Indir. labor costs
Part-time salaries
Overtime pay
CSU
*Wages
Chico
 SAP AG
GXX-WAGES
20.000,00
15.000,00
9.500,00
25.500,00
70.000,00
420000 . . .422000
431000
431000
Basic Set Components
C
o
m
p
o
n
e
n
t
s
Set ID
:
GXX - WAGES
Table
:
CCSS
Set type
: X
Basic set
Ref. set
:
Field name :
(Basic or
single-dim. set)
Selection
KSTAR
Table CCSS
CSU
Chico
 SAP AG
Field name
:
VERSN
GJAHR
KSTAR
KOSTL
:
Description
Version
Fiscal year
Cost element
Cost center
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
Wages
Salaries
Inc. costs
420000
:
422000
431000
430000
:
432000
:
CSU
Chico
 SAP AG
Energy
Single-Dimension Set: Hierarchy
Single - Dimension Set
SD
B
SD
B
SD
B
B
SD
SD
B
CSU
B
Chico
B
B
 SAP AG
SD
SD
B
B
SD
SD
B
SD
B
B
B
B
B
Single-Dimension Sets: Examples
Example
OAS Structure: Organizing cost
element sets in a hierarchy
Set: GXX-OAS-CELM
Set: GXX-PERSONNL
= Personnel, material, energy and other cost element sets
= Personnel costs
Report Layout: Total Costs
OAS cost elements
Personnel costs
Wages
420000
421000
422000
431000
Salaries
430000
434000
Material costs
Direct labor costs
Indir. labor costs
Part-time salaries
Overtime pay
20.000,00
15.000,00
9.500,00
25.500,00
*
430000
434000
Wages
Salary
Vacation pay
70.000,00
85.000,00
14.000,00
*
432000
440000
*
**
Salaries
Sick pay
Legal social exp.
Inc. costs
PERSONNEL
:
TOTAL COSTS
Inc. costs
432000
440000
CSU
Chico
 SAP AG
420000
421000
422000
431000
***
99.000,00
8.500,00
10.500,00
19.000,00
188.000,00
3.255.570,00
Single-Dimension Sets: Basic Entries
B
a
s
i
c
Set ID
:
GXX-PERSONNL
Set text
:
Personnel
No.
E
n
t
r
i
e
s
Set ID
Field: KSTAR
Set text
001
GXX-WAGES
Wages
002
GXX-SALARY
Salaries
003
GXX-INCIDENT
Incid. costs
Set ID entries
Double-click
Display contents
001 420000 - 422000
CSU
Chico
 SAP AG
002 431000
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 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
Defining Multi-Dimension Sets
Multi - Dimension Set
B
a
s
i
c
Set ID
Set type :
Header
:
No.
E
n
t
r
i
e
s
GXX-WAG-ADMI
X
Multi-Dimension Set
Set text Wages / Admin.
Set ID
Set text
Field name
001
GXX-WAGES
Wages
KSTAR
002
GXX-ADM-CST
Amin.
KOSTL
Set ID entries
CSU
Chico
 SAP AG
:
Combination of Different Set Types
MultiDimension
Set
Actual/Plan/Periods
SingleDimension
Set (Period)
Year
Data Set
Actual total
&
Plan total
SingleDimension
Set (Period)
First Half
Basic
Set
Period
001
002
003
CSU
Chico
 SAP AG
Basic
Set
Period
004
005
006
SingleDimension
Set (Period)
Second Half
Basic
Set
Period
007
008
009
Basic
Set
Period
010
011
012
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
PSWKG
Actual costs total (CO currency)
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
following structure:
DATA SET
ISWKG
PSWKG
Actual/Plan costs
Salaries / Administration
3200
3400
3500
3600
*
Personnel dept.
Accounting
Purchasing
Cafeteria
Salary
ACTUAL Total
50,000.00
60,000.00
40,000.00
25,000.00
175,000.00
3200
3400
3500
3600
Personnel dept.
Accounting
Purchasing
Cafeteria
20,000.00
15,000.00
10,000.00
6,000.00
22,000.00
17,000.00
11,000.00
5,550.00
51,000.00
226,000.00
55,550.00
243,550.00
CSU
*
**
Chico
 SAP AG
Vacation pay
Salaries
PLAN Total
45,000.00
80,000.00
39,000.00
24,000.00
18,000.00
Defining Data Sets
H
e
a
d
e
r
Set ID:
GXX-ACT-PLAN
Set type: X
Set text:
Actual/Plan Costs
30-character text description
Authorization group
B
a
s
i
c
No.
e
n
t
r
i
e
s
Name in data set
001
ISWKG
Actual costs
002
PSWKG
Plan costs
:
:
:
CSU
Chico
 SAP AG
Set line text
Data set
Data Set Entries (1)
Required
columns
in report
Current year
Cumulative
Total plan
Version Variable
CSU
Chico
 SAP AG
Current year
Cumulative
Total actual
Version 000
Previous year
Cumulative
Total actual
Version 000
Data Set Entries (2)
Required
columns
in report
D
A
T
A
F
I
E
L
D
Current year
Cumulative
Total plan
Version Variable
DATA SET ENTRY
ZCY-PLAN-CUM
S
W
K
G
CSU
Chico
 SAP AG
Current year
Cumulative
Total actual
Version 000
Previous year
Cumulative
Total actual
Version 000
Data Set Entries (3)
Required
columns
in report
D
A
T
A
F
I
E
L
D
Current year
Cumulative
Total plan
Version Variable
DATA SET ENTRY
ZCY-PLAN-CUM
S
W
K
G
ADDITIONAL SET
CY-PLCUM
CSU
Chico
 SAP AG
Current year
Cumulative
Total actual
Version 000
Previous year
Cumulative
Total actual
Version 000
Data Set Entries (4)
Required
columns
in report
D
A
T
A
F
I
E
L
D
Current year
Cumulative
Total plan
Version Variable
Current year
Cumulative
Total actual
Version 000
DATA SET ENTRY
ZCY-PLAN-CUM
S
W
K
G
ADDITIONAL SET
CY-PLCUM
CurYear &CYR
CSU
Chico
 SAP AG
Previous year
Cumulative
Total actual
Version 000
Data Set Entries (5)
Required
columns
in report
D
A
T
A
F
I
E
L
D
Current year
Cumulative
Total plan
Version Variable
Current year
Cumulative
Total actual
Version 000
DATA SET ENTRY
ZCY-PLAN-CUM
S
W
K
G
ADDITIONAL SET
CY-PLCUM
CurYear &CYR
Percum 1 ...... &PER
CSU
Chico
 SAP AG
Previous year
Cumulative
Total actual
Version 000
Data Set Entries (6)
Required
columns
in report
D
A
T
A
F
I
E
L
D
Current year
Cumulative
Total plan
Version Variable
Current year
Cumulative
Total actual
Version 000
DATA SET ENTRY
ZCY-PLAN-CUM
S
W
K
G
ADDITIONAL SET
CY-PLCUM
CurYear &CYR
Percum 1 ...... &PER
Valpln
CSU
Chico
 SAP AG
01
Previous year
Cumulative
Total actual
Version 000
Data Set Entries (7)
Required
columns
in report
D
A
T
A
F
I
E
L
D
Current year
Cumulative
Total plan
Version Variable
DATA SET ENTRY
CYR-PLAN-CUM
S
W
K
G
ADDITIONAL SET
other
conditions
DATA SET ENTRY
CYR-ACT-CUM
DATA SET ENTRY
ZPYR-ACT-CUM
CY-ACTCUM
Perbl
CurYear &CYR
Percum 1 ...... &PER
Valtyp
Valpln
Versn
CSU
Chico
 SAP AG
Previous year
Cumulative
Total actual
Version 000
ADDITIONAL SET
CY-PLCUM
Fyear
Current year
Cumulative
Total actual
Version 000
01
Varvers &VERSPLN
ADDITIONAL SET
CY-ACTCUM
Data Set Entries (8)
Required
columns
in report
Current year
Cumulative
Total plan
Version Variable
DATA SET ENTRY
ZCY-PLAN-CUM
Data set
*D CYR-PYR-PLCUM
001 ZCY-PLAN-CUM
002 ZCY-ACT-CUM
003 ZPY-ACT-CUM
CSU
Chico
 SAP AG
Current year
Cumulative
Total actual
Version 000
Previous year
Cumulative
Total actual
Version 000
DATA SET ENTRY
ZCY-ACT-CUM
DATA SET ENTRY
ZPY-ACT-CUM
LI XX
Predefined columns:
Name
Short description
x ISWKG
Total actual
x PSWKG
Total plan
.
.....
X ZCY-PLAN-CUM Current year plan cum.
X ZCY-ACT-CUM Current year act. cum.
X ZPY-ACT-CUM Prev. year act. cum.
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 :
B
a
s
i
c
E
n
t
r
i
e
s
GXX-ACT-PLAN
Set text: Actual/Plan/Var.
No.
ID in data set
Line text
001
ISWKG
ACTUAL Total
002
PSWKG
PLAN Total
003
Insert
Formula
Complete Set
Set: GXX-ACT-PLAN
No.
ID in data set
Line text
001
002
ISWKG
PSWKG
ACTUAL Total
PLAN Total
CSU
003Chico
= '001'- '002'
 SAP AG
Variance
Formula in line 003
'001' - '002'
Set lines
001
ISWKG
002
PSWKG
003
=
Formula Variables: Example 1
1. Current year?
2. Previous year?
Default values
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
3200
Personnel dept.
3400
Accounting
3500
Purchasing
3600
Cafeteria
Period ZZ to YY
*
Salary
175,000.00
3200
3400
3500
3600
Personnel dept.
Accounting
Purchasing
Cafeteria
*
**
Vacation pay
Salaries
50,000.00
60,000.00
40,000.00
25,000.00
20,000.00
15,000.00
10,000.00
6,000.00
51,000.00
226,000.00
Formula variables
ZQUPERV: 'ZQUART' * 3 - 2
CSU
Chico
ZQUPERB: 'ZQUART' * 3
 SAP AG
1. Quarter ?
2. Quarter ?
3. Quarter ?
4. Quarter ?
Value variable
ZQUART
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
Field
1KOSET
Default set
Description
Variable type
Table
1-S-KOSTL-AL
Cost center group
Set
CCSS
KOSTL
Authorization group
CSU
Chico
 SAP AG
Cost center
Set Variables 1
Multi - Dimension Set
WAGES
GXX-CELM-CST
&GXX-CEG
Set Variable
Selection:
...
...
Cost element group
GXX-ADM-CST
-
CSU
Chico
 SAP AG
Personnel dept.
Accounting
Purchasing
Cafeteria
GXX-WAGES
420000
Personnel dept.
Accounting
Purchasing
Cafeteria
421000
Personnel dept.
Accounting
Purchasing
Cafeteria
:
Act Plan
Set Variables 2
Multi - Dimension Set
Salaries
GXX-CELM-CST
&GXX-CEG
Set Variable
Selection:
...
...
Cost element group
GXX-ADM-CST
-
CSU
Chico
 SAP AG
Personnel dept.
Accounting
Purchasing
Cafeteria
GXX-WAGES
430000
Personnel dept.
Accounting
Purchasing
Cafeteria
434000
Personnel dept.
Accounting
Purchasing
Cafeteria
:
GXX-SALARY
Act Plan
Download