How to Pre Calculate Web Templates for Offline Usage - NW3.5

Embed Size (px)

Citation preview

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    1/17

    How to

    Precalculate Web Templatesfor 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 a warranty of any kind, either express or implied, including but not limited to, theimplied warranties of merchantability, fitness for a particular purpose, or non-infringement.

    SAP shall not be liable for damages of any kind including without l imitation direct, special, indirect, or consequential damagesthat 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 withinthese materials. SAP has no control over the information that you may access through the use of hot links contained in thesematerials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third partyweb pages.

    mySAP BI How-To papers are intended to simplify the product implementation. While specific product features andprocedures typically are explained in a practical business context, it is not implied that those features and procedures are theonly 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).

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    2/17

    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 countriesand regions & products. You want to provide your different country managers anintuitive offline report that allows them to analyze their sales data on a region andproduct level. They can drill down to the specific regions and products that belong totheir country and at the same time they can see the aggregated sales data of othercountries.

    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

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    3/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    4/17

    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 mostof the web items in your WebApplication.

    - Make sure you have asingle variable forcountry assigned laterwe want to precalculatethe web Application withdifferent variants for eachcountry manager

    - Make sure you have one

    characteristic material inthe columns This isnecessary to have a barchart as displayed above

    2. Create the second Queryaccording to the screen on theright. In our example, it shouldbe based on the same

    InfoProvider as the querycreated in step 1. Important isthe drilldown. Please also makesure you have at least Product inthe free characteristics. Later itshould be possible to set adynamic filter on thecharacteristic Product.

    This query will be used asdataprovider for our Sales tickeritem (Order volume per country)

    IMPORTANT:

    For our specific scenario please makesure you DO NOT include Region in thefree characteristics (explanation willfollow later)

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    5/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    3. Create the Control Query

    This query is necessary if you wantto precalculate filter navigation. We

    will have a drop down for Regionand a drop down for Product.

    That means you need a query thatdrills down according to bothcharacteristics. If you also want toprecalculate the All value in yourdrop downs you have to make surethat your control query generatesresult lines for both characteristics.In order to achieve this you have toput one of the characteristics into the

    rows and one into the columns.Note: If you have more than twodrop downs you can only pre-calculate the All option for the twodrop downs.

    As results are not created, when youhave no keyfigure in your query,make sure to add at least onekeyfigure, and check the propertysettings of the characteristics in theQuery Designer.

    Important: As we want to get allregions for the correspondingcountry, we need to add a variablefor the characteristic Country.

    Simply put Country into the freecharacteristics or filter area andassign the variable

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    6/17

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    7/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    course not be applied tothat query. Doing thisyou can achieve the samebehaviour as in theonline scenario.

    -We are using anembedded master datadocument item forProduct. That means, ifan end user filters on aProduct, a correspondingpicture is displayed. Ifyou want to use thatfeature please make sureyou have uploadedpictures for your product

    master data. Both *.gif &*.jpeg can beprecalculated

    - We are using variousfilter and text items eitherto display the filters anend user selects from thedrop downs but also todisplay the variablevalues that will be pre-calculated via a variant

    later on.

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    8/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    5. Create the precalculation setting

    - Start the AdministratorWorkbench and choosethe Reporting Agentfunction area. ChooseWeb Templates in thenavigation frame.

    - Choose your webtemplate and selectmaintain/new

    - Choose a description

    - Select HTML for WebBrowser

    - Choose Logon Language

    - Select a user, multipleusers or a role

    - Note: Be careful with the

    flag Precalculate-UserSpecifically

    - If you use that flag, theweb template will be pre-calculated with theindividual userauthorizations. This alsomeans the web templatewill be precalculated asmany times as there areusers assigned. This can

    take a long time,depending on scenarioand number of users.

    - You might use thisoption if the variable forCountry (in the Query 1and the control query) isfilled via authorizations:

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    9/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    if each country managerhas authorization onlyfor his/her country, onesetting can be used to dothe precalculation for allcountry managers. Wewill explain this later indetail

    6. Maintain Control Query

    You need to maintain the controlquery if you want to use filternavigation.

    - Please select Explicit

    - Select Control Query

    - Select a variant

    NOTE: From SP11(3.1C/SP5) onwards you willbe able to create variantsright here via a button. If youhave a system < SP11 youwill have to create thevariant by launching thecontrol query in the BExAnalyzer and using the

    variant functionality in thevariable pop-up.

    The drop down boxes will befilled by the characteristicvalues of the query resultexecuted with this variant.

    Now you have to select thevariant for your actual webtemplate. Usually the

    variable values you select forthis variant should beidentical to the ones youused for your control queryvariant.

    Sometimes it makes sense towork with variables that arefilled via an Authorization

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    10/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    /user exit. For example ifyou want to precalculate thedata for the country Franceand Germany and you wantto give the data for France toanother recipient than thedata for Germany the usageof authorization variablesmakes sense.

    If this is the case a single pre-calculated folder for eachuser will be generated afterthe pre-calculation.

    If you want to achieve thesame result (distributing usespecific data to n end-users)

    without using authorizationvariables and user-specificpre-calculation you have towork with n differentsettings. If you try this in onesetting you will end up withonly one pre-calculatedfolder that contains theprecalculated data for bothcountries. Hence it would beimpossible to separate it

    afterwards and give it todifferent receivers.

    Note: It is not a problem ifyou have a mixture ofvariables where somevariables are filled by an exit(e.g. authorization variables)and others via manual entry.

    Do not forget to execute thevariable pop-up afterselecting the values. Then

    specify a technical name anda description.

    It does not make sense tohave more than one variantselected if you are pre-calculating a web template.

    Note: Using multiple

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    11/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    variants only makes sense ifyou only pre-calculated thedata but not the webtemplate. If you only pre-calculate the data you canlater select a specific variantvia adding a variantparameter to your URL.

    7. Activation and Downloading

    You can now activate your settingand pre-calculate the templatedirectly or in batch. In order to dothat you have to assign yourpackage to a scheduling packageand then you can use standard batchprocessing to run the pre-calculationjob. (Please refer to standard BWdocumentation of the ReportingAgent for details on this.)

    Once that is done, users canimmediately download the packagesthat are pre-calculated for them, viathe download scheduler to theirdesktop computers.

    (The Download Sceduler is part ofthe standard BEx Suite and isinstalled on enduser desktop withthe BW Frontend Setup.

    Please refer to standard BWdocumentation of the DownloadScheduler for details on this.)

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    12/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    13/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    14/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    8. You can see the result on theright side (example with variant:Selection of France)

    In this Offline scenario aBrand Manager for Francecould see the aggregatedsales for each country in thenews ticker. Below in the

    chart and table he can see thespecific data for France(Picture 1).

    Via the drop downs he canfilter on specific regions onproducts. He can see thepicture of his filteredproduct.

    If he filters on a product notonly the chart and the table

    are filtered, but also the newsticker shows the aggregatedsales of the filtered productfor each country.

    Additionally filter texts aregenerated as captions foreach item (Picture 2).

    Picture 1

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    15/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    Picture 2

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    16/17

    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 Offlinenavigation you need to precalculate a page for every possible navigation. Since thiscan result in a huge number of precalculated pages a control query is used to limitthis 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. Forstatic 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 (soyou can use them for variant definition); but the underlying characteristic can also beused as dynamic filters. (Using control queries to define filter navigation) Pleasehave 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 orthe Web Application itself.

    What about authorizations?

    Access to precalculated documents via DownloadScheduler (or WebDAV) isrestricted according to the authorizations in the settings: a user needs to be in thelist of users or needs to be in a role assigned to a setting. If precalculateddocuments are accessed online (using the template-URL extended by&data_mode=static) the same authorizations are checked as if the template wouldbe processed directly.

    How can I realize paging within my table?

    Paging in Web Applications can only be realized with server interaction. Thereforethe Parameters BLOCK_SIZE and BLOCK_SIZE_COLUMNS are ignored. Thewhole table will be displayed at once. Workaround: use dropdownboxes to separatea big page into many smaller pages

    2003 SAP AMERICA, INC. AND SAP AG

  • 8/3/2019 How to Pre Calculate Web Templates for Offline Usage - NW3.5

    17/17

    HOW TO PRECALCULATE WEB TEMPLATES WITH BW 3.X

    I have Check-Boxes included in my Web Application; why do they not behavethe same way as Drop-Down Boxes?

    Check Boxes allows more than on one filter value at once, hence they are notsuitable for the scenario.

    What about custom Mime objects (Images, JavaScript-Libraries, ) stored inthe Mime-Repository?

    As the Web Template is not scanned for custom Mime objects, they are notincluded.

    When is the flag precalculate user-specifically appropriate ?

    If you work with variables that are filled via authorization, different users see differentdata in the same template. If you do the precalculation user-specifically, for eachauthorized user (i.e. authorized via list of users and roles in the settings) a separateprecalculation is done. Every user can access only the results of his/herprecalculation. 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 documentationfor Web item Text Elements.

    Why do I get the message no document found or no response whenaccessing a precalculated page with URL &data_mode=static ?

    The reason is most likely you have used template variants for precalculation and didnot specify the same variables in the URL. When working with precalculateddocuments (or with precalculated data, i.e. &data_mode=stored) no variable screenis 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 yourcontrol query. (If you have a precalculated document filtered with the result row, thisdocument will be taken if no filter values are specified).

    Other possible reasons: BW folders are not registered as SKWF rootfolders (OSSnote 0499480); for support packages < SP9 - check OSS note 564963

    2003 SAP AMERICA, INC. AND SAP AG