+ All Categories
Home > Documents > abap_rp2

abap_rp2

Date post: 10-Apr-2018
Category:
Upload: patris-sutrisno
View: 212 times
Download: 0 times
Share this document with a friend
33
¥ SAP AG CSU Chico Report Painter: More Advanced concepts MINS 298C-04 ABAP/4 Fall 1998
Transcript
Page 1: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 1/33

¥ SAP AG

CSU

Chico

Report Painter: More Advanced concepts

MINS 298C-04

ABAP/4

Fall 1998

Page 2: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 2/33

¥ SAP AG

CSU

Chico

Report Painter: More Advanced concepts

Copyright 1998Copyright 1998-- Gail CorbittGail Corbitt

Contents of this file are for the exclusive use of the specialContents of this file are for the exclusive use of the special

MINS 298C class dealing with SAP software at CSU ChicoMINS 298C class dealing with SAP software at CSU Chico

for the Fall 1998 semester. Any other use in either electronicfor the Fall 1998 semester. Any other use in either electronicor hardcopy form is prohibited without the express writtenor hardcopy form is prohibited without the express written

permission of the author. This material is confidential.permission of the author. This material is confidential.

Do not share it with anyone not enrolled in the class.Do not share it with anyone not enrolled in the class.

Lecture #2: Report Painter 2Lecture #2: Report Painter 2

Page 3: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 3/33

¥ SAP AG

CSU

Chico

Report Painter: More Advanced concepts

Objectives:

Exploding Rows

Creating Libraries

Creating Models

 Adding Text and other Layout Features

Performing Calculations

Finishing up Report Painter 

Page 4: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 4/33

¥ SAP AG

CSU

Chico

Exploding Rows

Occurs when you have a Row Value that consists of 

more values

Example: Cost Center Codes 40000 - 43000 could be

split out to individual codes or collapsed

Default is to NOT explode

To change this default: Edit --> Rows --> Explode

Page 5: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 5/33

¥ SAP AG

CSU

Chico

Group 1

Group 2

TotalTotal

400000

400100

600000

600100

Cost element group

Actual Plan Var.Actual Plan Var.

Total 30.000 20.000 10.000

Cost elementsCost elements

Cost elementsCost elements

400000400000400100400100

* Group 1

600000600000

600100600100

* Group 2

** Total

Cost elementsCost elements

400000400000

400100400100

600000600000

600100600100

Actual Plan Var.Actual Plan Var.

Actual Plan Var.Actual Plan Var.

5.000 5.0005.000 5.0005.000 5.0005.000 5.000

10.000 5.000 5.000

10.000 10.00010.000 10.000

10.000 5.000 5.00010.000 5.000 5.000

20.000 15.000 5.000

30.000 20.000 10.000

5.000 5.0005.000 5.000

5.000 5.0005.000 5.000

10.000 10.00010.000 10.000

10.000 5.000 5.00010.000 5.000 5.000

Explode

Do not explode

Single values

Exploding Report Rows

Page 6: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 6/33

¥ SAP AG

CSU

Chico

Report Painter: Creating New Libraries

Library defines what objects (attributes of objects) can

be included in it¶s reports

Defines Selected:

Characteristics (attributes that are key fields)

Key Figures (types of ³measures´ or values -- typically numeric)

Pre-Defined Columns

Defined by SAP

Consist of  Key Figures and Characteristics

Can Define Your  own 

Page 7: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 7/33

¥ SAP AG

CSU

Chico

 A library contains: A library contains:

- Characteristics

- Key figures

- Predefined columns

Criteria for selecting

data records(cost element, version...)

Value fields in selected

data records

Combinations of 

characteristics and

key figures

- content-related

reports

Library

Report group CReport group B

Report group A

Page 8: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 8/33

¥ SAP AG

CSU

Chico

Report Painter: Creating New Libraries

Report Painter --> Report Writer --> Library --> Change

Copy and then Modify (Add and Delete attributes)

Create: Creates a custom library for your reports

Create a Library for your Reports Report Painter --> Report Writer --> Library --> Create

Start name with a Z

Display Existing Libraries:

Report Painter --> Report Writer --> Library --> Display --> Utilities --> Catalog

Page 9: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 9/33

¥ SAP AG

CSU

Chico

LIBRARY : Z01

TABLE : CCSS

Description: Cost Center Accounting Reports

Characteristics Key figures Predef. columnsName Position Name Position Name Position

X Controlling area

X Cost center 

X Cost element

X Order 

X Fiscal year X Period

:

:

1

2

3

4

56

X Costs

X Quantity

X Activity quantity

X Stat. quantity

X Costs in obj. currencyX Variable costs

:

:

1

2

3

4

56

X Actual costs

X Plan costs

X Act. qty. current period

X Act. activity fiscal year 

X Stat. quantity planX Disp. activity fiscal year 

:

:

1

2

3

4

56

Library Maintenance

Page 10: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 10/33

¥ SAP AG

CSU

Chico

Report Painter: Models

Model = Template

Sets of Rows OR Columns You May Want to Re-use

Models are Static: If you Change a Model you Must

Change All Reports That Use the Model OR HaveReports with Different Versions of the Model

Report Painter --> Model --> Create

Use for  column Definition: Within Report Definition: Edit --> Columns --> Get Column Model

Edit Rows -- > Get Row Model (for Rows)

Page 11: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 11/33

¥ SAP AG

CSU

Chico

Flexible Reports with Variables

KOKRS

Controlling areaControlling area

&1KOKRE&1KOKRE

GJAHR

Fiscal year Fiscal year 

&1GJAHV&1GJAHV -- &1GJAHB&1GJAHB

Controlling area --------------from fiscal year --------------to fiscal year --------------

from period --------------to period --------------

Cost element group (set) -------------------------

or value(s) ----- -----

Resulting selection screen:Resulting selection screen:

PERBL

PeriodPeriod

&1PERIV&1PERIV -- &1PERIB&1PERIB

KSTAR

?? ??

???? CostCost Element & 1KSTARElement & 1KSTAR

Page 12: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 12/33

¥ SAP AG

CSU

Chico

Using Variables in Report Painter 

Variable: Defined Parameter that Users fill in at Run

Time

Year, Starting Period and Ending Period, etc.  for  the Data

Types of Variables:

Value:  single Value such as Controlling Area, Company Code, Wor kCenter, Plant, etc.

Formula: Rolling Periods or Previous June with This June

Set: Set up groups that corresponds to the way the data are 

structured. For  example, Groups in CO can be used as a Set Parameter 

Find parameter ID through technical info in field definition

Page 13: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 13/33

¥ SAP AG

CSU

Chico

Value Variables

Variable 1PERIV

Field name PERBL

Default value 1

Description from period

Table CCSS

Use parameter ID

Entry: Characteristic values

to 1PERIB

Cost center:

to

or group 1KOSET

Controlling area: 001

Fiscal year: 1996

to

Period: 1PERIV

Page 14: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 14/33

¥ SAP AG

CSU

Chico

MILLER

1. Current year?1. Current year?

2. Previous year?2. Previous year?

Default values

from the system

Formula variable 1GJAHLJ: System exit that determines the current fiscalFormula variable 1GJAHLJ: System exit that determines the current fiscal

year from the controlling area and the fiscalyear from the controlling area and the fiscal

year variant.year variant.

Formula variable 1GJAHVJ: Internal variable that determines the previous year Formula variable 1GJAHVJ: Internal variable that determines the previous year 

1GJAHVJ = 1GJAHLJ1GJAHVJ = 1GJAHLJ -- 11

Formula Variables

Page 15: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 15/33

¥ SAP AG

CSU

Chico

Variables for Groups (Set Variables)

Variable 1KOSET

Field name KOSTL

Reference set 1-S-KOSTL-AL

Description Cost center group

Table CCSS

Entry: Characteristic values

Controlling area: 0001

Fiscal year: 1996

to

Period: 1PERIV

to 1PERIB

Cost center:

to

or group 1KOSET

Page 16: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 16/33

¥ SAP AG

CSU

Chico

Adding Blocks and Sections

Block: Columns that are grouped together 

Example: Sales report in $ by Product vs Quantity by Product

Row Structure is identical for  all column blocks

Menu Path: Go To --> New Column Block

Section: Rows that are grouped together 

Example: Planned and Actual Costs by Cost Center  and by Product Group

Column Structure is identical for  all row blocks

Menu Path: Go To --> New Section

Page 17: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 17/33

¥ SAP AG

CSU

Chico

Cost elements Actual Plan Var.Cost elements Actual Plan Var.

400000400000

400100400100

::

Activity types Actual Plan Var.Activity types Actual Plan Var.

Direct labor hoursDirect labor hours

Direct repair hoursDirect repair hours

::

Stat. key figures Actual PlanStat. key figures Actual Plan

EmployeeEmployee

Telephone costsTelephone costs

::

Section 1

Section 2

Section 3

Sections Example

Page 18: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 18/33

¥ SAP AG

CSU

Chico

Cost elem. Act. costs Plan costs Var.Cost elem. Act. costs Plan costs Var.

400000 . . . . . . . . .400000 . . . . . . . . .

400100 . . . . . . . . .400100 . . . . . . . . .

400200 . . . . . . . . .400200 . . . . . . . . .

: : : :: : : :

* Total . . . . . . . . .* Total . . . . . . . . .

Cost elem. Act. qty Plan qty. Var.Cost elem. Act. qty Plan qty. Var.

400000 . . . . . . . . .400000 . . . . . . . . .

400100 . . . . . . . . .400100 . . . . . . . . .

400200 . . . . . . . . .400200 . . . . . . . . .

: : : :: : : :

* Total . . . . . . . . .* Total . . . . . . . . .

Column block 1: Costs Column block 2: Quantities

identical row structure

Column Blocks Example

Page 19: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 19/33

¥ SAP AG

CSU

Chico

Adding Text to a Report

Types of Text

Title page

Header (top of  every page)

Footer (foot of  every page)

Last Page

Entering Text

Menu Path:  Extras --> Report Text

Enter  directly Can also use variables, parameters, characteristics, etc.

Page 20: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 20/33

¥ SAP AG

CSU

Chico

Standard variablesfor example

Report name

Page number 

Date of selection

Author of report

Library description

......

Selection parametersSelection parameters

for examplefor example

From period (value)From period (value)

To period (value)To period (value)

Fiscal year (value)Fiscal year (value)

........

CharacteristicsCharacteristics

for examplefor example

Controlling areaControlling area

Cost center Cost center 

Special variables

for example, person responsible for 

the cost center 

Report name: < > Page: < >

From period: < >From period: < > To period: < >To period: < >

Fiscal year : < >Fiscal year : < >

Cost center: < >Cost center: < >

Person responsible: < >

Entering Text

Page 21: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 21/33

¥ SAP AG

CSU

Chico

Standard Layouts

Standard layouts used in many companies so all

reports have same look and feel

Basically a Corporate Template for reports

Define a Standard in layouts Menu Path: Report Writer --> Standard layout --> Create

 Attach a layout to a report by displaying it -- this is used for  the report you are wor king on

Defaults provided by SAP (see drop down list)

Page 22: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 22/33

¥ SAP AG

CSU

Chico

Layout Settings

4200 Salaries . . . . . . . . . . . . . . . .4200 Salaries . . . . . . . . . . . . . . . .

4300 Wages . . . . . . . . . . . . . . . .4300 Wages . . . . . . . . . . . . . . . .

4400 Add. costs . . . . . . . . . . . . . . . .4400 Add. costs . . . . . . . . . . . . . . . .

------------------ ------------------------------------ ------------------Cost elementCost element

** TotalTotal . . . . . . . . . . . . . . . .

Level of detail

Color 

Overscore andunderscore

Column width No. format +/- sign Text type

Page 23: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 23/33

¥ SAP AG

CSU

Chico

Standard LayoutReport Definition

Standard Layout: TRAININGColumn totals

Totals position Column break

left none

right line Other character  

Layout

Column widthRight margin

Unit width

1 to 5

3 characters Other value Variants 1 to 5

Column textsText type Alignment Miscellaneous

Master data text Left-justified Suppress zero columns

Field value and text Centered Underline col. break

Field name and fld value Right-justified character  

Field value

Suppress

X

X

X

X X

Page 24: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 24/33

¥ SAP AG

CSU

Chico

Calculations in Report Painter 

Cells are given Z values as you click on cells you want

to use for calculations

Suppress Rows and Columns that you want to use for 

calculations but don¶t want to show

Z001

Z002

Page 25: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 25/33

¥ SAP AG

CSU

Chico

Cells in Formula Columns

Costs Act. Plan Act. per employeeCosts Act. Plan Act. per employee

Stat. key figures Actual PlanStat. key figures Actual Plan

EmployeeEmployee

Telephone unitsTelephone units

Cell Z001Cell Z001

Key figure with

characteristics

Predefined column

Formula

Formula:

X001 / Z001

X001X001

X002X002

Actual costs

Plan costs

Z001Z001 Employee / actual

Section 1

Section 2

Page 26: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 26/33

¥ SAP AG

CSU

Chico

Section 2:Section 2:

Stat. actual key figuresStat. actual key figures

Calculation Using Cells

TelephoneTelephone

unitsunits

EmployeeEmployee

PlanPlan ActualActual

Section 1:Section 1:

CostsCosts PlanPlan ActualActual Act./Empl.Act./Empl.

TotalTotal

Section 3: Important statisticsSection 3: Important statistics

Costs / EmployeeCosts / Employee

Telephone units /Telephone units /

EmployeeEmployee

PlanPlan ActualActual

Page 27: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 27/33

¥ SAP AG

CSU

Chico

Stat. key figures Actual PlanStat. key figures Actual Plan

EmployeeEmployee

Telephone costsTelephone costs

Cell Z002Cell Z002

Costs Actual Plan Var.Costs Actual Plan Var.

..........................

..........................

..........................

..........................

..........................

TotalTotal

Cell Z001Cell Z001

Section 1 Section 2

Section 3

Costs per employeeCosts per employee

Actual PlanActual Plan

Formula:

Z001 / Z002

Costs / Actual

Employee / Act.

Sections with Calculated Key Figures

Z001

Z002

Page 28: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 28/33

¥ SAP AG

CSU

Chico

Suppressed Rows and Columns

Order Order Debit previous year Debit previous year 

(Period 1(Period 1 -- 13)13)

Debit current year Debit current year 

(Period 1(Period 1 -- 4)4)

Total debitTotal debit

(Column 1 + Column 2)(Column 1 + Column 2)

1000 1.000 500 1.5001000 1.000 500 1.500

2000 4.000 1.000 5.0002000 4.000 1.000 5.000

3000 700 300 1.0003000 700 300 1.000

4000 2.000 2.000 4.0004000 2.000 2.000 4.000

suppressed columns

Page 29: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 29/33

¥ SAP AG

CSU

Chico

Additional Considerations

Variation: Allows you to run the same report at detail

or summary level determined at run time

Define the Variation function in Report Definition under General Data Selection

 At Run time push variation button and select the desired variation level

Execute the Report Group

Multiple Selection: Run the same report but separate

every time by variable, I.e. Cost Center 

Page 30: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 30/33

¥ SAP AG

CSU

Chico

Multiple Selection

Example

Reports to be output

CoArea 0001CoArea 0001

FYear 1992FYear 1992CoArea 0001CoArea 0001FYear 1993FYear 1993

CoArea 0002CoArea 0002FYear 1992FYear 1992

CoArea 0002CoArea 0002FYear 1993FYear 1993

1

2

3

4

4

combinations

CoArea from 0001 to 0002CoArea from 0001 to 0002

(or set)(or set)

FYear from 1992FYear from 1992 to 1993to 1993(or set)(or set)

Page 31: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 31/33

¥ SAP AG

CSU

Chico

Multiple Selection (continued)

FixedFixed HierarchyHierarchy Selected groupsSelected groups

XX " "" " S02000S02000 1 Area report1 Area report" "" " XX all setsall sets 5 Reports5 Reports" "" " " "" " only basic setsonly basic sets S02110, S02120, S02200S02110, S02120, S02200

3 Reports3 Reports

(or value(s) from . . .to)(or value(s) from . . .to)

HierarchyHierarchy S02000

S02000

Warehouse

S02000

ENERGY

S02110

Warehouse1

S02120

Warehouse2

-2210 Electricity

-2220 Water 

-2230 Gas

Page 32: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 32/33

¥ SAP AG

CSU

Chico

Variation

S02000

S02000

Warehouse

S02000

ENERGY

S02110

Warehouse 1

S02120

Warehouse 2

-2240 Electricity-2250 Water 

-2260 Gas

- 2210 Incoming warehouse - 2220 Outgoing warehouse

- 2230 Semi-finished product

Variation

Explode Do not explode Single valuesExplode Do not explode Single values

Page 33: abap_rp2

8/8/2019 abap_rp2

http://slidepdf.com/reader/full/abaprp2 33/33

¥ SAP AG

CSU

Chico

Leveraging Existing Reports

Run a Report in SAP

Extras --> Display Definition

Extras --> Technical Info (drill down on Program name)

Shows  you ABAP code

Copy from these reports and then modify

When you create the report use Options --> Copy From