Вы находитесь на странице: 1из 17

How to Precalculate Web Templates for Offline Usage

Applicable Releases: BW 3.0B SP 11 / BW 3.1C SP5 March 2003

SAP (SAP America, Inc. and SAP AG) assumes no responsibility for errors or omissions in these materials. These materials are provided as is without implied warranties of merchantability, fitness a warranty of any kind, either express or implied, including but not limited to, the 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. mySAP BI How-To papers are intended to simplify the product implementation. While specific product features and procedures typically are explained in a practical business context, it is not implied that those features and procedures are the only approach in solving a specific business problem using mySAP BI. Should you wish to receive additional information, clarification or support, please refer to SAP Professional Services (Consulting/Remote Consulting).

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

1 Business Scenario
You have a BW Web Application designed with the Web Application Designer and you want to precalculate the template for Offline usage. In our scenario : A BW Web Applications shows sales data for different countries and regions & products. You want to provide your different country managers an intuitive offline report that allows them to analyze their sales data on a region and product level. They can drill down to the specific regions and products that belong to their country and at the same time they can see the aggregated sales data of other countries. Features included, are Variables Tables, charts, news ticker Embedded documents Filter navigation via drop downs Multiple data providers

2003 SAP AMERICA, INC. AND SAP AG

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

2003 SAP AMERICA, INC. AND SAP AG

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

2 The Step-By-Step Solution


1. Create the first query. This query is used for rendering most of the web items in your Web Application. Make sure you have a single variable for country assigned later we want to precalculate the web Application with different variants for each country manager Make sure you have one characteristic material in the columns This is necessary to have a bar chart as displayed above

2. Create the second Query according to the screen on the right. In our example, it should be based on the same InfoProvider as the query created in step 1. Important is the drilldown. Please also make sure you have at least Product in the free characteristics. Later it should be possible to set a dynamic filter on the characteristic Product. This query will be used as dataprovider for our Sales ticker item (Order volume per country) IMPORTANT: For our specific scenario please make sure you DO NOT include Region in the free characteristics (explanation will follow later)

2003 SAP AMERICA, INC. AND SAP AG

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

3. Create the Control Query This query is necessary if you want to precalculate filter navigation. We will have a drop down for Region and a drop down for Product. That means you need a query that drills down according to both characteristics. If you also want to precalculate the All value in your drop downs you have to make sure that your control query generates result lines for both characteristics. In order to achieve this you have to put one of the characteristics into the rows and one into the columns. Note: If you have more than two drop downs you can only precalculate the All option for the two drop downs. As results are not created, when you have no keyfigure in your query, make sure to add at least one keyfigure, and check the property settings of the characteristics in the Query Designer. Important: As we want to get all regions for the corresponding country, we need to add a variable for the characteristic Country. Simply put Country into the free characteristics or filter area and assign the variable

2003 SAP AMERICA, INC. AND SAP AG

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

4. Create your Web Application This procedure is not described in detail here. If you are not familiar with the BW Web Application designer please refer to Standard Documentation: Just a few things that are important in our case: We are using Query 1 and Query 2 as data providers: Query 1 is assigned to the chart & the table, Query 2 is assigned to the news ticker We are using 2 Drop Down Boxes. The Pproduct drop down is assiged to both data providers (Attribute Affected Data Provider), the Region drop down is only assigned to the dataprovider using Query 1 That means in an online scenario if an end user selects a product the sales ticker is also filtered according to the specific product; but no filter on region will take place for this item For our Offline scenario it is important that you did not include Region in your free characteristics in the step above. In Offline scenarios the filter values of the drop downs are per default applied to all data providers. But if you do not include region in a query the drop down values for region can of

2003 SAP AMERICA, INC. AND SAP AG

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

course not be applied to that query. Doing this you can achieve the same behaviour as in the online scenario. We are using an embedded master data document item for Product. That means, if an end user filters on a Product, a corresponding picture is displayed. If you want to use that feature please make sure you have uploaded pictures for your product master data. Both *.gif & *.jpeg can be precalculated We are using various filter and text items either to display the filters an end user selects from the drop downs but also to display the variable values that will be precalculated via a variant later on.

2003 SAP AMERICA, INC. AND SAP AG

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

5. Create the precalculation setting Start the Administrator Workbench and choose the Reporting Agent function area. Choose Web Templates in the navigation frame. Choose your web template and select maintain/new

Choose a description Select HTML for Web Browser Choose Logon Language Select a user, multiple users or a role Note: Be careful with the flag Precalculate-User Specifically If you use that flag, the web template will be precalculated with the individual user authorizations. This also means the web template will be precalculated as many times as there are users assigned. This can take a long time, depending on scenario and number of users. You might use this option if the variable for Country (in the Query 1 and the control query) is filled via authorizations:

2003 SAP AMERICA, INC. AND SAP AG

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

if each country manager has authorization only for his/her country, one setting can be used to do the precalculation for all country managers. We will explain this later in detail 6. Maintain Control Query You need to maintain the control query if you want to use filter navigation. Please select Explicit Select Control Query Select a variant

NOTE: From SP11 (3.1C/SP5) onwards you will be able to create variants right here via a button. If you have a system < SP11 you will have to create the variant by launching the control query in the BEx Analyzer and using the variant functionality in the variable pop-up. The drop down boxes will be filled by the characteristic values of the query result executed with this variant. Now you have to select the variant for your actual web template. Usually the variable values you select for this variant should be identical to the ones you used for your control query variant. Sometimes it makes sense to work with variables that are filled via an Authorization

2003 SAP AMERICA, INC. AND SAP AG

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

/user exit. For example if you want to precalculate the data for the country France and Germany and you want to give the data for France to another recipient than the data for Germany the usage of authorization variables makes sense. If this is the case a single precalculated folder for each user will be generated after the pre-calculation. If you want to achieve the same result (distributing use specific data to n end-users) without using authorization variables and user-specific pre-calculation you have to work with n different settings. If you try this in one setting you will end up with only one pre-calculated folder that contains the precalculated data for both countries. Hence it would be impossible to separate it afterwards and give it to different receivers. Note: It is not a problem if you have a mixture of variables where some variables are filled by an exit (e.g. authorization variables) and others via manual entry. Do not forget to execute the variable pop-up after selecting the values. Then specify a technical name and a description. It does not make sense to have more than one variant selected if you are precalculating a web template. Note: Using multiple

2003 SAP AMERICA, INC. AND SAP AG

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

variants only makes sense if you only pre-calculated the data but not the web template. If you only precalculate the data you can later select a specific variant via adding a variant parameter to your URL. 7. Activation and Downloading You can now activate your setting and pre-calculate the template directly or in batch. In order to do that you have to assign your package to a scheduling package and then you can use standard batch processing to run the pre-calculation job. (Please refer to standard BW documentation of the Reporting Agent for details on this.) Once that is done, users can immediately download the packages that are pre-calculated for them, via the download scheduler to their desktop computers. (The Download Sceduler is part of the standard BEx Suite and is installed on enduser desktop with the BW Frontend Setup. Please refer to standard BW documentation of the Download Scheduler for details on this.)

2003 SAP AMERICA, INC. AND SAP AG

10

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

2003 SAP AMERICA, INC. AND SAP AG

11

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

2003 SAP AMERICA, INC. AND SAP AG

12

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

8. You can see the result on the right side (example with variant: Selection of France) In this Offline scenario a Brand Manager for France could see the aggregated sales for each country in the news ticker. Below in the chart and table he can see the specific data for France (Picture 1). Via the drop downs he can filter on specific regions on products. He can see the picture of his filtered product. If he filters on a product not only the chart and the table are filtered, but also the news ticker shows the aggregated sales of the filtered product for each country. Additionally filter texts are generated as captions for each item (Picture 2).

Picture 1

2003 SAP AMERICA, INC. AND SAP AG

13

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

Picture 2

2003 SAP AMERICA, INC. AND SAP AG

14

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

3 FAQ
How can I integrate Reporting Agent scheduling into my Data-Staging scenario? You can integrate Reporting Agent Scheduling packages into the process chains. Please refer to the standard BW documentation. Why do I need a control query for offline filter-navigation? When navigating online a page is only generated when it is requested. For Offline navigation you need to precalculate a page for every possible navigation. Since this can result in a huge number of precalculated pages a control query is used to limit this number. Can I use a control query to schedule a template with different variable values? No. This is not possible. Control queries are only used to set the dynamic filters. For static filters you need to define variants for your variables. What about variables, that can be changed during query navigation? Variables which are changeable during query navigation behave like variables (so you can use them for variant definition); but the underlying characteristic can also be used as dynamic filters. (Using control queries to define filter navigation) Please have a look at note 339476. I set up my package and scheduled it, but no documents were created One of the reasons can be initial mandatory variables for either the Control-Query or the Web Application itself. What about authorizations? Access to precalculated documents via DownloadScheduler (or WebDAV) is restricted according to the authorizations in the settings: a user needs to be in the list of users or needs to be in a role assigned to a setting. If precalculated documents are accessed online (using the template-URL extended by &data_mode=static) the same authorizations are checked as if the template would be processed directly. How can I realize paging within my table? Paging in Web Applications can only be realized with server interaction. Therefore the Parameters BLOCK_SIZE and BLOCK_SIZE_COLUMNS are ignored. The whole table will be displayed at once. Workaround: use dropdownboxes to separate a big page into many smaller pages

2003 SAP AMERICA, INC. AND SAP AG

15

HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

I have Check-Boxes included in my Web Application; why do they not behave the same way as Drop-Down Boxes? Check Boxes allows more than on one filter value at once, hence they are not suitable for the scenario. What about custom Mime objects (Images, JavaScript-Libraries, ) stored in the Mime-Repository? As the Web Template is not scanned for custom Mime objects, they are not included. When is the flag precalculate user-specifically appropriate ? If you work with variables that are filled via authorization, different users see different data in the same template. If you do the precalculation user-specifically, for each authorized user (i.e. authorized via list of users and roles in the settings) a separate precalculation is done. Every user can access only the results of his/her precalculation. This way you dont need to have a separate setting for each user. Template contains variables filled by user authorization. See previous question. How can I display in my template, when precalculation was done? Add a Text element item into your Web Template. SYUZEIT will give you last refresh (precalculation) of date and time. Please refer to the standard BW documentation for Web item Text Elements. Why do I get the message no document found or no response when accessing a precalculated page with URL &data_mode=static ? The reason is most likely you have used template variants for precalculation and did not specify the same variables in the URL. When working with precalculated documents (or with precalculated data, i.e. &data_mode=stored) no variable screen is processed. Therefore all variables need to be specified in the URL. Similarly, you did not specify filter values in the URL, but, have no result row in your control query. (If you have a precalculated document filtered with the result row, this document will be taken if no filter values are specified). Other possible reasons: BW folders are not registered as SKWF rootfolders (OSS note 0499480); for support packages < SP9 - check OSS note 564963

2003 SAP AMERICA, INC. AND SAP AG

16

Вам также может понравиться