Sei sulla pagina 1di 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
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

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 : From value : To value

Basic entries

Additional entries

: Special Report Writer 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 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

Basic Set: Basic Entries


B a s i c E n t r i e s
Set Field No. 001 . . .GXX-WAGES . . .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, deleted) together

420000 . . .422000 Report layout 420000 421000 422000 431000 Direct labor costs Indir. labor costs Part-time salaries Overtime pay GXX-WAGES 20.000,00 15.000,00 9.500,00 25.500,00 70.000,00 431000

420000 . . .422000

CSU *Wages Chico

431000

SAP AG

Basic Set Components


C o m p o n e n t s
Set ID : GXX - WAGES

Table
Set type Ref. set

:
: X :

CCSS
Basic set

Field name : (Basic or single-dim. set)

Selection KSTAR

Table CCSS Field name : VERSN GJAHR KSTAR KOSTL : Description Version Fiscal year Cost element Cost center

CSU Chico
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 Wages Salaries Inc. costs

Material costs

Energy

420000 : 422000 431000

430000 :

432000 :

CSU Chico
SAP AG

Single-Dimension Set: Hierarchy


Single - Dimension Set

SD B SD SD SD

SD

SD

SD
SD B
SAP AG

B
B B

SD
B

SD
B

B
B

B B

CSU B Chico

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

420000 421000 422000 431000 * 430000 434000 * 432000 440000 * ** ***

Direct labor costs Indir. labor costs Part-time salaries Overtime pay Wages Salary Vacation pay Salaries Sick pay Legal social exp. Inc. costs PERSONNEL : TOTAL COSTS

20.000,00 15.000,00 9.500,00 25.500,00 70.000,00 85.000,00 14.000,00 99.000,00 8.500,00 10.500,00 19.000,00 188.000,00 3.255.570,00

Personnel costs

Material costs

Wages 420000 421000 422000 431000

Salaries 430000 434000

Inc. costs 432000 440000

CSU Chico
SAP AG

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. costs Field: KSTAR

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 E n t r i e s
Set ID : GXX-WAG-ADMI X Multi-Dimension Set

Set type :

Header

Set text Wages / Admin.

No. 001

Set ID GXX-WAGES

Set text Wages

Field name KSTAR

002

GXX-ADM-CST

Amin.

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

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 * 3200 3400 3500 3600 Personnel dept. Accounting Purchasing Cafeteria Salary Personnel dept. Accounting Purchasing Cafeteria Vacation pay Salaries ACTUAL Total 50,000.00 60,000.00 40,000.00 25,000.00 175,000.00 20,000.00 15,000.00 10,000.00 6,000.00 51,000.00 226,000.00 PLAN Total 45,000.00 80,000.00 39,000.00 24,000.00 18,000.00 22,000.00 17,000.00 11,000.00 5,550.00 55,550.00 243,550.00

CSU * ** Chico
SAP AG

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

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 ...... &PER


Valpln

CSU Chico
SAP AG

01

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

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 . ..... 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 : GXX-ACT-PLAN No. 001 002 ID in data set ISWKG PSWKG Set text: Actual/Plan/Var. Line text ACTUAL Total PLAN Total

B a s i c E n t r i e s

003
Formula in line 003 '001' - '002' Set lines 001 ISWKG 002 PSWKG 003 =

Insert Formula Complete Set Set: GXX-ACT-PLAN No. 001 002 ID in data set ISWKG PSWKG Line text ACTUAL Total PLAN Total Variance

CSU 003Chico '002' = '001' SAP AG

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 * 3200 3400 3500 3600 * ** Salary Personnel dept. Accounting Purchasing Cafeteria Vacation pay Salaries
Period ZZ to YY

50,000.00 60,000.00 40,000.00 25,000.00 175,000.00 20,000.00 15,000.00 10,000.00 6,000.00 51,000.00 226,000.00

1. Quarter ? 2. Quarter ? 3. Quarter ? 4. Quarter ?

Formula variables

ZQUPERV: 'ZQUART' * 3 - 2 ZQUPERB: 'ZQUART' * 3


SAP AG

CSU Chico

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
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

Set Variables 1
Multi - Dimension Set
WAGES

Act Plan

GXX-CELM-CST

&GXX-CEG
-

GXX-ADM-CST
Personnel dept. Accounting Purchasing Cafeteria

Set Variable
Selection: ... ... Cost element group
SAP AG

420000 Personnel dept. Accounting Purchasing Cafeteria 421000 Personnel dept. Accounting Purchasing Cafeteria :

CSU Chico

GXX-WAGES

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. Accounting Purchasing Cafeteria 434000 Personnel dept. Accounting Purchasing Cafeteria :

CSU Chico

GXX-WAGES

GXX-SALARY

Potrebbero piacerti anche