Sei sulla pagina 1di 26

Chapter :8

Chapter :9

Creating Workbooks

In this chapter you will learn:

Contents

Overview................................................................................................................. 82
Before Getting Started..........................................................................................83
Creating a Workbook: An Overview.....................................................................85

How to create a workbook


template using the BEx
Analyzer

How to insert a query (or


queries) into a workbook

How to save a workbook


template to the
InfoCatalog

How to add pushbuttons


and textboxes to a
workbook template using
simple Visual Basic
commands

Step 1: Starting the BEx Analyzer........................................................................86


Step 2: Creating a Workbook Template...............................................................87
Step 3: Saving the Template to the InfoCatalog................................................812
Step 4: Inserting Queries into the Workbook....................................................814
Step 5: Adding Visual Basic Functionality to Workbook..................................816
Step 6: Saving the Workbook to the InfoCatalog..............................................823
Review.................................................................................................................. 825

Report Development Tools

Chapter 8: Creating Workbooks


Review

Overview
Chapter 7 presented an overview of BWs architecture, concepts, and
terminology. In this chapter you will learn how to use the Business Information
Warehouse to create workbooks (or reports).
As shown in the graphic below, creating a workbook in the BW is essentially a
five-step process:

Create
Create aa workbook
workbook
template
template (optional)
(optional)

Insert
Insert desired
desired query
query (or
(or queries)
queries)
into
into aa workbook
workbook

Enhance
Enhance workbook
workbook layout
layout
and
functionality
(optional)
and functionality (optional)

Create
Create aa new
new query
query or
or
modify
an
existing
query
modify an existing query

Chapter 9

Enable
Enable access
access to
to aa workbook
workbook
through
through the
the BEx
BEx Browser
Browser

Chapter 10

Chapter 8

You are here

To help you get started with the Business Information Warehouse, we have
organized the material as follows:
Chapter 8: Creating Workbooks
Chapter 9: Creating Queries
Chapter 10: Working with the BEx Browser
Chapter 11: Special Topics (including tips & tricks)
In this chapter you will be working with the BEx Analyzer and Microsoft Excel.
With the help of a business scenario (see next page), we will show you three
guided tours:
Creating a workbook template

Inserting an existing query into a workbook

Using Visual Basic to add workbook functionality

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

In chapter 9 you will learn how to work with queries. In chapter 10 you will see
how to access workbooks through the BEx Browser.

Before Getting Started


Before you start building workbooks, it is useful to understand the following:
What is the business scenario? (see below)

What does the finished workbook look like? (see next page)

Business Scenario
Take a few minutes to familiarize yourself with the business scenario shown
below. All the guided tours in chapters 8 through 10 are built around this
business scenario.
Bungee Software, Inc. develops and markets games for personal computers.
Best-selling titles such as Portal Kombat, Barrio Brothers, and Kung Fu
Grandma have helped Bungee Software become a leading supplier of
computer games. However, the company is currently facing increased
competition from Pixialated, Inc. To protect its market share, Bungee Software
has formed a task force to explore ways to streamline its sales processes.
The company has discovered that collecting and disseminating sales data to
executives consumes considerable time and resources. The task force believes
that easier access to sales and profit analysis information would save time and
help executives with sales-planning activities.
Some of the key questions the executives typically ask are:
How does the sales revenue for 1998 compare with 1997 sales?
What is the annual gross profit?
What is the sales volume for the top products?
What is the sales volume for the top customers?
Which sales representative/manager is responsible for declining sales
volume?
After evaluating its information needs, Bungee Software has decided to
develop the following reports in the Business Information Warehouse:
Sales Analysis Report (in this example, 1998 vs. 1997)

Gross Profit Analysis Report

Note: The workbook you are about to develop is based on the SAP-delivered
SD DemoCube Workbook (in the SAP DemoCube channel). To follow the
guided tours covered in chapters 8-10, make sure that the DemoCube is
active and loaded with the data on your BW system. For more information on
activating the SAP DemoCube, see chapter 11 or contact your SAP system

Report Development Tools

Chapter 8: Creating Workbooks


Review

administrator.

A Quick Look at the Output


The SD DemoCube Workbook we are about to build contains two reports (or
worksheets): Sales Analysis Report and Gross Profit Analysis Report.
The screenshots below show what each of these reports looks like. Take a few
minutes to familiarize yourself with the layout and structure of the finished
reports.

Report 1: Sales Analysis Report


Text area shows
comments that
explain report data.

Right-click the mouse to drill


down by sales organization,
distribution channel, division,
industry, material, and more.

Sales Revenue for 1997 and 1998


Gross Profit Analysis
pushbutton launches
the second report
Gross Profit Analysis
in the workbook.

Percent change

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

Report 2: Gross Profit Analysis Report


Text area shows
comments that
explain report data.
Gross Profit Analysis by
Sales Organization.

Pushbuttons to launch
other views of the data.

Sales Analysis
pushbutton returns
you to the first
report

Guided Tour

Creating a Workbook: An Overview


Now that you are familiar with the sample reports shown in the previous section,
you are ready to create a workbook. If you have access to a Business Information
Warehouse system, you may want to follow along.
Shown below are the steps for creating a workbook (based on the business
scenario):

Report Development Tools

Chapter 8: Creating Workbooks


Review

Start
Start BEx
BEx Analyzer
Analyzer

Create
Create aa workbook
workbook template
template

Save
Save the
the workbook
workbook template
template
to
to InfoCatalog
InfoCatalog

Insert
Insert query
query into
into the
the workbook
workbook

Add
Add Visual
Visual Basic
Basic
functions
to
the
workbook
functions to the workbook

Save the
the workbook
workbook to
to InfoCatalog
InfoCatalog
6 Save

If you plan to follow the guided tour on your own system, make sure that the
BW frontend components are properly installed on your computer. If
necessary, contact your system administrator for assistance.
To check if the BW frontend is installed on your computer, choose Start
Programs SAP BW Front-end.
If you do not find the SAP BW Frontend, try searching for SAP BW components
under other SAP logon menus.

Step 1: Starting the BEx Analyzer


1. From your Windows desktop, choose Start Programs SAP Front-end BW.
2. Choose SAP Business Explorer Analyzer.
3. If you see a warning message about macros in Microsoft Excel, choose
Enable Macros to continue.
Microsoft Excel opens with the add-in SAP Business Explorer toolbar in the main
window.

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

Business Explorer Toolbar

About the BEx Analyzer


The structure of BW workbooks is defined using the Business Explorer (BEx)
Analyzer. You can define queries, graphics and other elements, and insert
them into workbooks. The result of a query is presented in an Excel
Worksheet. The BEx Analyzer is implemented as an add-in for Microsoft
Excel, and links queries to cells in Excel workbooks. Thus, you evaluate query
data by navigating through the query in an Excel worksheet.

What Is the Business Explorer Toolbar?


The SAP Business Explorer toolbar integrates BW reporting functionality in the
Microsoft Excel environment. The BEx toolbar enables filtering, sorting, drilldown,
currency translation, computation of results, use of attributes and hierarchies,
saving and managing workbooks, and more. In addition to the Toolbar, you can
still use the full Excel functionality.

Select from
InfoCatalog

Refresh Change Change


query
query formatting Settings

New

Help

Save to
InfoCatalog

Report Development Tools

Undo

OLAP
function
for active
cell

Tools

Chapter 8: Creating Workbooks


Review

to create a new workbook

to change the existing query

to select and execute workbooks from the BW


InfoCatalog

to work with active cells to enable


functions such as computation of results,
drilldown, filtering, sorting, currency
translation, etc.

to save the current workbook to either the BW


Enterprise InfoCatalog or the user Favorites

to alter the font properties, background


color, and other formatting options in a
workbook

to refresh/update data in a query from the


source(s).

to insert/delete queries, attach charts,


display the header information of a query,
and set the password in the active Excel
workbook

to undo one navigation step

to make configuration settings for data


refreshing, connection to the BW server,
and more

Note: As we start building a workbook template, it is important to recognize


that a workbook template is no more than an empty worksheet with some
formatting; it does not include any embedded queries. Creating queries is
covered later in chapter 9.

Step 2: Creating a Workbook Template


After you have logged on to the BEx Analyzer, you are ready to start building
your workbook template.
Note: Building a template is not mandatory when you are working with the
Business Information Warehouse. If you do not want to create a template at
this time, you can jump ahead to chapter 9 to learn about building queries.
The process of designing your workbook template can be divided into the
following substeps:
1. Format the background
2. Hide the Excel toolbars
3. Insert company logo
4. Save the template to the InfoCatalog

Formatting the Workbook Background


Start from the BEx Analyzer environment in Microsoft Excel.

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

1. In Microsoft Excel,
choose
New from
the standard Excel
toolbar. A new
spreadsheet workbook
appears.

2. Choose Format
Sheet Background.

3. Choose C:\Program
Files\Microsoft
Office\Clipart\Backgro
und\Wheat.
Note: If the BW frontend is
installed on a drive other
than C, use the
appropriate drive letter.
You can choose any
background you like.

Hiding the Window Views


To add make your workbook easier to use, you may want to consider hiding
some of the window views.
1. Choose Tools
Options.

Report Development Tools

Chapter 8: Creating Workbooks


Review

2. In the Options window,


select the View tab.
2

3. Deselect Gridlines,
Row & column
headers, Outline
symbols, Zero values,
horizontal Scroll bar,
and Vertical scroll bar.
Do not deselect the
Sheet tabs.
4. Choose OK to save the
new options.

Hiding the Microsoft Excel Toolbars


To make it easier for your users to use the workbook, you may want to consider
hiding some of the Excel toolbars.
1. Choose View
Toolbars and deselect
Standard and
Formatting toolbars.
Do not deselect the
Business Explorer
toolbar.

10

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

Your Excel worksheet


should look like the one
shown at right. Notice that
the horizontal and vertical
scroll bars, row and
column headers,
formatting toolbar, and
gridlines are now hidden.

Inserting Company Logo


To further customize your workbooks, you can add your company logo (or other
graphical elements) to the workbook template. You have three options:
Insert the logo in workbook template and save it to the InfoCatalog.
Insert the logo and save the workbook as a Microsoft Excel template on
your local drive.
Upload the logo file to the BW system to have it appear in the BEx
Browser (for more information see chapter 11).
1. Copy the logo (or other
graphics) to your
clipboard using the
copy command (for
example, Ctrl+C in
Windows) in your
graphics application
(for example, Microsoft
Paint, PowerPoint,
etc.) .

2. Paste the clipboard


contents into your
workbook template. In
this example, the
Bungee Software logo
was created in
PowerPoint and pasted
to the template. Using
drag-and-drop, position
the logo as needed.

Report Development Tools

11

Chapter 8: Creating Workbooks


Review

Saving a Local Copy of the Template


In step 3 below you will learn how to save the workbook template to the
InfoCatalog. To reuse the template later, you may also want to save a copy of the
template on your local drive.
1. Choose File Save As
2. In Save as type choose
Template (*.xlt)
3. In File name, enter a
name for the template
(for example,
Bungee_Template.xlt)
4. Choose Save.

Hint: To create a new workbook (based on the saved template), simply choose
File New. From the popup window, choose Bungee_template.xlt.

12

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

Step 3: Saving the Template to the InfoCatalog


Saving the template to the InfoCatalog will enable others to use the template for
report creation. Additionally, it helps maintain a uniform "look-and-feel for all
reports in a company.
1.

From the template


view, choose
Save
to save it to the
InfoCatalog button.

2.

Choose Add as new


4

workbook under the


General tab.
3.

4.

Enter a New Title (for

example, Bungee
Template).

Choose the Access in


InfoCatalog tab.

5.

6.

To make the workbook


template available to
others, choose in
(public) enterprise
catalog.
Choose OK.

Report Development Tools

13

Chapter 8: Creating Workbooks


Review

7.

The SAP Logon window


appears and prompts
you to log on to the BW
system. Choose the
system you want to
use.

Choose OK.
8.
Note: If you are already
logged on to a BW system,
you will not see the logon
window.

9.

Enter the client


number, your user
name, password, and
language key.

10

Choose OK.
10.
Your workbook template
has now been save to the
InfoCatalog.

If you are unsuccessful in logging on to the BW system after


following steps 7 through 9 above, go to the SAP logon pad you
normally use and log on to the BW system.

To check if the template is


available in the
InfoCatalog, follow the
steps below:
Switch to the BW
11.
system.
12.

14

Choose

11

12

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

The Bungee Template is


now a part of the
Enterprise InfoCatalog.
You can allow the user
community to freely
access the template to
build reports.

The newly created workbook


template is now available in
the InfoCatalog.

The option to save the workbook to the Enterprise InfoCatalog may


depend on the authorization settings in individual user profiles. If you
cannot save to the Enterprise InfoCatalog, please see your system
administrator.

Step 4: Inserting Queries into the Workbook


Queries pull together the data needed to build reports. The Business Information
Warehouse delivers many predefined queries. You can also design your own
queries or modify existing queries (see chapter 9).
To insert a query, start
from the BEx Analyzer.
Although you can insert a
query into any Excel
spreadsheet, we will show
how to insert a query into
the newly created Bungee
template.

2
3

1. Choose the cell where


the query is to be
inserted.
2. Choose

Tools.

3. Choose Insert Query.

Report Development Tools

15

Chapter 8: Creating Workbooks


Review

4. In the SAP BEx: Select


Query window, open
the folder
0D_SAP_DEMOCUB to
view the nested
hierarchy, (for
example, 0D_SD
0D_DECU for the Sales
Analysis Report).

5. Choose the query you


want to use (for
example,
0D_SD_DEMO_Q0001).

6. Choose Open.

After inserting a new


query, your workbook
should look like the one
shown at right.
7. Choose Sheet 2 to
insert the second
query (Gross Profit
Analysis).
8. Repeat steps 2
through 4 to create the
second worksheet.
9. Repeat step 5 above
but choose
0D_SD_DEMO_Q0002
instead.

Note: You can insert more than one query into a workbook.

16

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

Inserting a Query into the Workbook Template


To insert a query into the workbook template, shown below is another
approach:

Choose Settings from the BEx toolbar and select Select workbook on New.

Choose New from the BEx toolbar. It will prompt you to choose a previously
saved workbook template from the InfoCatalog.
Select a query and choose Enter.

The query is inserted into the selected workbook template. Based on the new
settings, in future you will be prompted to choose a workbook template from
the InfoCatalog every time you choose New on the BEx toolbar.

Step 5: Adding Visual Basic Functionality to Workbook


As shown in the business scenario on page 2, Bungee Softwares workbook
design calls for pushbuttons to allow easy navigation between the two reports.
Additionally, the reports contain a textbox to allow annotations and commentary.
To achieve this, you can add Visual Basic functionality to the workbook template.

Creating Pushbuttons
1. To continue working

with the workbook


template (using the
SAP-delivered
DemoCube template),
start from the Business
Explorer Analyzer
window.

2. To create a

pushbutton, choose
View Toolbars
Control Toolbox.

Report Development Tools

17

Chapter 8: Creating Workbooks


Review

3. From the Control

Toolbox, choose
Command Button.
4. Click to select an area

where you want to


position the first
pushbutton.
5. To edit the title of the

command button,
choose the Command
Button, right-click the
mouse, and choose
Command Button
Object Edit.

6. Enter a name for the

pushbutton. In our
example, since we
plan to use this
pushbutton to launch
the Sales Analysis
report, we call it Sales
Analysis.
7. Drag it to the lower left

corner of the
spreadsheet (or other
desired location).

6
7

8. Repeat steps 2

through 7 to create the


second pushbutton
(Gross Profit Analysis).

18

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

9. Choose Sheet1 of the

workbook, right-click
the mouse, and choose
Rename.
10. Rename Sheet1. In this

example, it has been


named Sales Analysis.
11. Repeat steps 9

through 10 to rename
the second worksheet
(Gross Profit Analysis).
12. To delete the extra

worksheet, Sheet3,
choose Sheet 3, rightclick the mouse, and
select Delete.

13. To define an action for

the pushbutton,
double-click the Sales
Analysis pushbutton
(or choose the Sales
Analysis pushbutton,
right-click the mouse,
and choose View
Code).

13

14. To link the Sales

Analysis pushbutton to
15
the Sales Analysis
worksheet and specify
that the Sales Analysis
worksheet is to be
activated when the
pushbutton is clicked,
insert

14

16

Worksheets(Sales
Analysis). Activate
15. Choose

View
Microsoft Excel to

Report Development Tools

19

Chapter 8: Creating Workbooks


Review

return to the BEx


Analyzer.
16. Repeat steps 12

through 14 to define
the action for the
second pushbutton
(Gross Profit Analysis)
to the second
worksheet (Gross
Profit Analysis).
17. Position the cursor and

create a report title


(for example, Sales
Analysis Report).

17

18. To change the font

properties (font color


etc.), choose the Sales
Analysis pushbutton,
right-click the mouse
and choose Properties.

18

19. From the Alphabetic

tab, choose BackColor,


then click the selection
button and choose
ToolTip.

21

20. To change the font

19

color, go to ForeColor,
click the selection
button, and choose the
Highlight option.
Close to
exit the Properties
screen.

20

21. Choose

22. Repeat steps 18

22

through 21 to set the


font color in
Properties for the

20

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

second pushbutton
(Gross Profit Analysis).
23. To test the action of

the Sales Analysis and


Gross Profit Analysis
pushbuttons, choose
Exit Design Mode
from the Control
Toolbox.

24
23

Optional: You may want to


hide the sheet tabs at the
bottom of the screen.
24. To hide the sheet tabs,

choose Tools
Options from the Excel
menu bar.

25. Choose the View tab.


26. Deselect Sheet tabs.

25

27. Choose OK.

The pushbuttons in the


workbook template for
Bungee Software are now
operational.

26

27

Creating a Textbox
1. To create a textbox,
choose
in the
Control Toolbox.

Report Development Tools

21

Chapter 8: Creating Workbooks


Review

2. Position the cursor in a


cell. Then, click the
mouse, hold it, and
drag it to create the
area of the textbox.
3. Choose the textbox,
right-click the mouse
and choose Properties.

4. Choose the Alphabetic


tab.
5. Choose MultiLine and
change the option to
True.

6. Choose ScrollBars and


change the option to 3
fmScrollBarsBoth.
7. Close the Properties
screen.

22

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

8. To add (or edit) text,


choose the textbox,
right-click the mouse,
and choose TextBox
Object Edit.

9. In the textbox, enter


the explanatory text to
support report data.
10.Choose

Exit Design

Mode in the Control


Toolbox to end design
changes.

11

12
10
9

11.Close the Control


Toolbox.
12.From the BEx Toolbar,
choose
Save.
13.Enter a new workbook
name and save it to
the InfoCatalog.

The Sales workbook for Bungee Software is now ready for use. We have added
the functions needed to build a sample workbook (based on the business
scenario on page 2).

Report Development Tools

23

Chapter 8: Creating Workbooks


Review

Step 6: Saving the Workbook to the InfoCatalog


1. To save the workbook
to the InfoCatalog,
choose
Save to
InfoCatalog.

2. You can either save


your workbook as a
new workbook or
overwrite an existing
workbook. For this
example, choose Add
as new workbook.

3. Enter a title for the


new workbook, for
example Bungee Sales
Workbook.

4. Choose OK.
5. To give other users
access to this
workbook, choose in
(public) enterprise
catalog from the
Access in InfoCatalog
tab.

6. Choose OK.

24

Reporting Made Easy

Chapter 8: Creating Workbooks


Review

Review
Creating a workbook in BW is a five-step process:

Step 1: Create a workbook template (optional).

Step 2: Insert desired query (or queries) into a workbook.

Step 3: Enhance workbook layout and functionality using Visual


Basic commands (optional).

Step 4: Create a new query (or modify an existing query).

Step 5: Enable access to the workbook through the BEx Browser.


The sample workbook covered in this guidebook is based on the SAPdelivered SD DemoCube Workbook.
A workbook can contain more than one query.

The Business Explorer toolbar integrates BW reporting functionality in the


Microsoft Excel environment.
To create a workbook, follow these steps:

Step 1: Start BEx Analyzer.

Step 2: Create a workbook template (optional).

Step 3: Save the workbook template to the InfoCatalog.

Step 4: Insert a query (or queries) into a new workbook.

Step 5: Add Visual Basic functions (optional).

Step 6: Save the new workbook to the InfoCatalog.


When designing the workbook template, you can easily:

Format the background

Hide Excel toolbars

Insert company logo


You can use Visual Basic commands to add pushbuttons, textboxes, and
other functions to enhance your workbook.

Report Development Tools

25

Chapter 8: Creating Workbooks


Review

26

Reporting Made Easy

Potrebbero piacerti anche