Session Title - Lenoir

Download Report

Transcript Session Title - Lenoir

Customize Web-based BW
reports and functionality with
Business Server Pages
(BSPs)
Dr. Bjarne Berg & Deepu Sasidharan
© 2006 Wellesley Information Services. All rights reserved.
What We’ll Cover …
•
Introduction
•
Introduction to WAS and BSP
•
Use of BSP applications in NetWeaver BI
•
A look at some application issues and solutions
•
BW Web Printing
•
Wrap-up
2
Introductory Slide
•
In this session we will be examining how you can use BSP and
other SAP provided web tools to improve on the NetWeaver user
experience.
•
While we will be showing some basic code examples on how thing
are done, the session is intended for both programmers, managers
and report developers.
•
We will also be demonstrating some of the features and give you a
general idea on what features you can add using simple BSP
enhancements provided by SAP.
3
What We’ll Cover …
•
Introduction
•
Introduction to WAS and BSP
•
Use of BSP applications in NetWeaver BI with demos
•
A look at some application issues and solutions
•
BW Web Printing
•
Wrap-up
4
Evolution of WAS
5
WAS – What is included?
SAP Web Application Server (WAS) provides the basis for BW
3.0B and higher.
WAS integrates ABAP
engine and a Java-2
Enterprise Edition
(J2EE) engine in one
application server.
6
Introduction to BSP
Business Server Pages (BSP) is a page-based programming
model with server side scripting for designing web
applications.
The BSP programming model is similar to the server page
technology like ASP, JSP etc.
BSP uses ABAP for implementing Business Logic and
HTML/CSS for presentation logic.
BSP server side scripting enables direct access to all
elements on the application server such as ABAP
Objects, Function Modules, Database elements etc.
7
BSP Architecture
8
BSP Architecture
1)
2)
3)
4)
5)
User requests URL
BSP Engine creates related BSP object
BSP Engine invokes a predefined sequence of events (Event handler code of BSP
object is invoked.)
HTML page is generated by execution of scripting code
BSP Engine sends back HTML page to browser and browser displays HTML page
9
Introduction to BSP and the Web Application Builder
Web Application Builder (transaction code SE80 from SAP GUI) can be
used for creating BSP Applications.
Web Application builder functions:
Create
BSP Applications and Pages
Editing
BSP layouts using ABAP and HTML
Integration of
Mime Repository for mime objects
Implementing BSP
Activating
Event Handlers in ABAP
and Executing BSP applications
10
BSP – The web application Builder interface
11
BSP - Basics
Properties can be used for setting the general properties of the BSP web
pages such as Compression, Stateful, Caching, HTTPS (secure HTTP).
Layout settings can be used for determining the presentation
logic for using server-side scripting in the layout. This means
that the code is not executed on the client browser, but instead
processed on the server, which has more “horse power”.
Event handlers allow the separation of static and dynamic code in a page.
The layout processing
deals with the static
data, while the event
handlers deal with the
dynamic data.
12
BSP – Shared and unique page attributes
Page attributes are parameters that are declared explicitly for a page.
Page attributes can be accessed from the layout and by event handlers.
If you mark any page attributes as ‘automatic’, the attributes
automatically gets the formatting and values from another web page or
navigation step. This simplifies shared formatting and reuses the code.
13
Executing and activating services for BSP
Use the Web Application Builder Toolbar to execute the BSP.
The ICF service for
BSP should be
activated from
transaction code
SICF before
executing the BSP
application.
14
What We’ll Cover …
•
Introduction
•
Introduction to WAS and BSP
•
Use of BSP applications in NetWeaver BI with demos
•
A look at some application issues and solutions
•
BW Web Printing
•
Wrap-up
15
Practical uses of BSP applications in NetWeaver Web Reports
BSP Applications along with SAP delivered function
modules can be used for enhancing web reports.

Search Queries in role menu assigned reports and favorites

Centralized BW favorites and management

Emailing Bookmarks and comments

Metadata dictionary with on-line business definitions
Solution
We will now look at a few practical examples on how BSP
can be used to enhance the NetWeaver user experience
16
Search Queries in role menu assigned reports and favorites
Issue
Users often have access to hundreds of queries and favorites
“buried” in a maze of folder structures. It is hard to find what
you are looking for.
You can use SAP delivered
Function Modules along
with BSP to provide a
search interface for
locating reports in user
roles and favorites.
17
How is it done? – Query searching in the role menu using BSP
1) Use a JavaScript function for calling the BSP application
from the BW Web template.
2) Read the search term entered by the user in the BSP page.
18
How is it done? – Query searching in the role menu using BSP
3) Use SAP delivered Function Module ‘BX_SEARCH_OBJECT’ to
search the User role with the search term entered by the user.
Make sure that the
search text matches the
attribute name
(i.e. “searchstring”).
Note: the attribute name
is not case sensitive
19
Using BSP to create centralized BW Favorites
Issue
Standard web bookmarks are stored in the web browser and is
therefore not available on all PCs. Also, the NetWeaver BI
administrators does not know what views users are really
accessing.
Centralized favorites allow
users to manage favorites in
a central repository. These
favorites are not browser
specific and can be
accessed through the BW
role menu web item.
A ‘Save Bookmark’ icon can
be made available from the
BW Toolbar.
20
Using BSP to create centralized BW Favorites
We can add simple features, so that the users have the option to create
sub folders inside favorites to manage bookmarks better.
This allows
users to save
their versions
of the BW
query with the
variables that
they have
selected.
21
How is it done? - Centralized BW Favorites
BW Web API and JavaScript function is used to create the bookmark
on the BW server by passing the Bookmark Id to the BSP application to
insert the Bookmark to User favorites.
To save Bookmark with current data use
the command 'BOOKMARK_DATA=X'.
22
Centralized BW Favorites
Users can access the Bookmarks from BW Role menu and does not
need to use the favorites in their internet browser.
The favorites created in the current user session will be
available only the next time the users logs into the system.
23
Using BSP to create centralized BW Favorites
‘Manage Favorites’ Icon from the BW Toolbar allows
the users to
delete, rename,
move and email
favorites.
24
How is it done? - Centralized BW Favorites
BSP applications are used for the various functions like
Delete, Rename and Move.
Email bookmark function can also be designed to open up
e-mail applications like Outlook Express.
The delete Favorite
function deletes the
Bookmark from the
user favorites and
also deletes the
physical bookmark
from the BW server.
25
Centralized BW Favorites
26
Email Bookmark
Sometimes we want to only send a quick link to a person or a mail
group in a simple manner without having to use the steps
Issue Broadcaster wizard (available in BW 3.5 or higher).
‘Email Report’ Icon from
the BW Toolbar and
Manage Favorites allows
the users to email
favorites using standard
SMTP.
27
How is it done? - Email Bookmark
‘Email Report’ creates a Bookmark in the BW system and
passes on the Bookmark ID to the Email application.
28
How is it done? – Create an email bookmark application with BSP
A custom BSP application is build for emailing Bookmarks
based on the SAP delivered BSP (BSPTUTORIALMAIL).
29
Email Bookmark
You can also use MS Outlook for Emailing Bookmarks.
JavaScript function is used for emailing the Bookmark.
Tip
SAP/BW/BCT/JAVASCRIPT/BCTTASK.JS  SAPBCTSendPage
30
Email Bookmark
31
Definitions
In a typical BW system 30-40% of all measures presented to the
end users does not exist in the source system. These are
Issue calculated key figures (CKF), restrictive key figures (RKF) and
virtual key figures (VKF).
Users often have a mistrust of these numbers since they cannot
see how they are calculated and what they mean.
Also, a typical BW system may also have hundreds of
characteristics and masterdata elements that users are unfamiliar
with.
Access to definitions and explanations are critical to
successful adaptation of BW in an organization
32
Definitions – What can be done?
Build a simple application for BW definitions and provide access to
business definitions for all the terms used in a report (including the
report itself).
Let users access the definitions directly from the standard context
menu of any characteristic or key figure.
33
How is it done? - Definitions
The definitions are stored in a Z table in the BW System, the Z table
has the following fields.
OBJ_ID
Unique Identifier
OBJ_NAME
BW Object Name
OBJ_DESCRIPTION
Definition
34
How is it done? - Definitions
This simple BSP Page is used for accessing the Definitions stored in
the Z Table inside BW (no new servers needed).
Since the match is on
each infoObject, the
definitions entered is
available in all queries
where the infoObject
is used, and also in
any new queries being
created.
35
What else can you use BSP for? - Some ideas
BSP applications can be used to build:
Custom
logon application
Custom
Role menu
BW
Report branding
BW
Documentation apps
Bex Query
Designer
Business Server Pages
(BSP)
Cool Applications and Features
Admin
interfaces
Reading
Table data36
What We’ll Cover …
•
Introduction
•
Introduction to WAS and BSP
•
Use of BSP applications in NetWeaver BI with demos
•
A look at some application issues and solutions
•
BW Web Printing
•
Wrap-up
37
BW Online Help and Training
BW and OLAP can be quite confusing to a first-time user.
Issue
Since there are many features and navigation options, users
often gets lost in the terminology and ‘explanations’ from
power users and other experts.
An on-line help system for end users with training material and
on-line demos is a great tool to make sure that the system is
well received by the user community
38
BW Online Help – What can you do?
•
Make sure that your on-line help application provides many ways to find the information.
•
Organize the content based on a folder structure as well as by an index.
•
Create many internal links inside the help text and use many images.
39
How is it done? - BW Online Help
People can relate to demos and ‘movies’, and there are many low-cost
tools that can help you quickly create a set of BW help animations
Note
Tools like Camtasia Studio, SnagIt and Dreamweaver
studio can be used to develop these help animations.
40
How is it done? - BW Online Help
BW Online Help files (HTML,
Images, Video files etc.) can
be stored in the WAS Mime
Repository (SE80).
Use the ‘Import Mime
Objects’ function to add
files to the Mime
Repository.
41
How is it done? - BW Online Help
The files can be accessed directly via URL
<Path to the Mime Object Repository>/BWHelp_files/home.html
Maintaining different folder structure inside the Mime
Repository makes maintenance easier.
42
What We’ll Cover …
•
Introduction
•
Introduction to WAS and BSP
•
Use of BSP applications in NetWeaver BI with demos
•
A look at some application issues and solutions
•
BW Web Printing
•
Wrap-up
43
Web Print formatting with Excel
Formatting options for BW web reports have been very limited
in the past unless you used Crystal reports.
Issue
However, Excel has many good formatting features and in the
past BW users often relied on the BEx Excel interface to format
their reports and bypassed the whole web delivery.
Many has asked why SAP did not provide better web formatting
options for the queries that were published to the web.
44
Web Printing with Excel
We can now implement an Excel based interface for printing web
reports.
Depending on the size of the report users may have three
different options available:
Portrait
Landscape
Landscape Legal
Pre-requisite - Import ABAP Package and Classes provided
as part of ‘How To…Web Printing with Microsoft Excel’.
45
How is it done? - Web Print formatting with Excel
The data will be exported to Excel and ‘Fit-to-page’ depending on the
options selected by the user.
Customization options include options for specifying a print specific
template and stylesheet.
Users can use
rich Excel print
settings for
printing.
46
Another option is a pure web solution with no Excel….
A JavaScript based solution can be used for providing the users
options for printing reports in one page.
Depending on the size of the report users have 3 different options
available for ‘Fit-to-page’ :
Portrait
Landscape
Landscape Legal
If user’s want a pure web
solution, this is a better option
47
How is it done? – pure web printing with no Excel
Use BW Web API along with JavaScript for opening up the current report
in a print template.
JavaScript function and stylesheet can be used for dynamically
changing the font size of the report. The JavaScript loops through the
page with different font sizes to find a size that fits the size of paper
selected (portrait, landscape or legal).
Since the web browser
may override the format
suggested, users must
also make sure that the
paper format selected is
consistent with the format
selected in the browser
48
What We’ll Cover …
•
Introduction
•
Introduction to WAS and BSP
•
Use of BSP applications in NetWeaver BI with demos
•
A look at some application issues and solutions
•
BW Web Printing
•
Wrap-up
49
Resources
• SDN: SDN BSP Forum
https://forums.sdn.sap.com/forum.jspa?forumID=49&start=0
Where
to
FIND it
 Web Log: BSP – a Developer Journal
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/550
• SAP
online help
http://help.sap.com/saphelp_nw04/helpdata/en/e9/bb153aab4a0c0ee10000000a114084/content.ht
m
• SAP
Press Books
 Advanced BSP Programming
http://www.sap-press.com/product.cfm?account=&product=H1903
 SAP Web Application Server
http://www.amazon.com/gp/product/1592290132/
 BSP Extensions: How to Master Web Reporting
http://www.sap-hefte.de/katalog/hefte/titel/gp/titelID-952
50
7 Key Points to Take Home
•
Expect to use BSP for user enhancements and added features
•
BSP is not a total custom solution, SAP supports many features
•
Make sure you have both BW and web developers on the team
•
Build a solid help and training system (user’s expects this).
•
Favorites and bookmarks stored on the browser are not a great
features.
•
On-line definitions for every infoObject will reduce support calls
•
Consider developing admin applications such as
tracking data load performance using BSP as well
51
Your Turn!
How to contact us:
Dr. Bjarne Berg
Deepu Sasidharan
[email protected]
[email protected]
52