Beruflich Dokumente
Kultur Dokumente
SAP (SAP America, Inc. and SAP AG) assumes no responsibility for errors or omissions in these materials.
These materials are provided “as is” without a warranty of any kind, either express or implied, including but not limited to, the
implied warranties of merchantability, fitness for a particular purpose, or non-infringement.
SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages
that may result from the use of these materials.
SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within
these materials. SAP has no control over the information that you may access through the use of hot links contained in these
materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party
web pages.
HOW TO GET BW DATA INTO EXCEL WITHOUT HAVING AN SAP FRONTEND INSTALLED
1 Scenario
This paper describes how to deliver BW WebReporting results into Excel spreadsheets by the help of
Excel’s Web Query feature. This method admittedly gives you much less functionality than the usual
way of retrieving BW data into Excel using the BEx Analyzer add-in – most prominently, interactive
reporting is not possible at all with this approach.
You no longer need RFC connectivity, or any other part of the SAP frontend installed on your PC. All
that is needed here is HTTP connectivity to your BW Server
(In Release 2.0B/2.1C of BW, this means you’ll have to have an SAP ITS server sitting on your web
server, which can pass incoming HTTP requests on to a BW application server).
This document describes how Web Queries can be used in Excel2000. The forthcoming next version
of Excel will further improve on the user interface and functionality for maintaining Web Queries. In
Excel97, Web Queries have already been available, although with limited functionality. However, their
maintenance was much more difficult. If you are interested in using Web Queries with Excel97, we
recommend that you download the so-called “Web Connectivity Kit for Excel“ from:
http://officeupdate.microsoft.com/downloadDetails/webcnkit.htm
2 The Result
The query’s result will automatically be presented in the worksheet.
The idea is to embed so-called Web Queries into Excel, which retrieve HTML via an HTTP request
into Excel. Web Queries render the information they receive directly into a range of cells in the
Excel worksheet.
https://myHostName/scripts/wgate/webrfc/!?_function=WEBQUERY&CMD=LDOC&WBID=F4
HF1H8OEXRB6FO0SF6XMDJ4F&PAGEID=myPageName&~login=JOHNDOE&~client=012&~
password=MYSECRET&~language=EN
To avoid having to hard code the password directly into the workbook query definition, you may want
to provide a dialog in Excel that prompts the user for the password and adds it to the URL (see
section 5.4).
BW WebReporting items which work particularly well with Excel Web Queries are the Table item, the
Filter item, and the Text Elements item. However, even with these you’ll have to exclude everything
that could add interactivity – because interactivity in BW WebReporting normally relies on Browser
scripting and/or stateful URLs, which are both unusable in Excel and could lead to all kinds of erratic
behavior. In particular, interactivity that would be rendered in the form of icons should be avoided. In
Excel, those icons would appear as shortcuts which a) are unattractive and b) would not work anyway,
see above.
From this it follows that, when publishing your Table, Filter, and Text Elements items, you should
switch off the flags for “Display header“ and “Add interactivity links“, and also set the value for “Fixed
page size“ to 0.
It’s also a good idea to add the parameter “...&STATELESS=TRUE“ to your Web Query URL to let the
BW Server know that you’re not going to use any interactive features. This allows for some
optimization, and you will receive your results a little faster.
End Function
Then you choose an arbitrary cell outside (!) the Web Query’s result area, and enter into it the formula
“=myRefreshHandler(X1)“, where X1 is an arbitrary cell inside (!) the Web Query’s result area. As long
as you have “Calculation“ set to “Automatic“ in Excel (see the “Calculation“ tab in Excel’s “Options...“
dialog), a refresh of your Web Query will now automatically invoke your script.
“&FILTER_IOBJNM=ODB_CNTRY“ & _
myQueryTable.Refresh
End Sub