Escolar Documentos
Profissional Documentos
Cultura Documentos
Warehouse
Product(s): IBM Cognos 10; Area of Interest: Infrastructure
Daniel Wagemann Cognos Proven Practices Advisor IBM Rich Borucki Solution Specialist IBM Pierre Valiquette Software Engineer IBM This document is intended to provide a single point of reference for techniques and product behaviours when dealing with SAP NetWeaver Business Warehouse (SAP BW) as a data source in IBM Cognos 10. View more content in this series Contributors This effort would not have been possible without contributions from Patricia Defosse, Linda Whitney, and Agnes Chau. Skill Level: Advanced Date: 07 Jan 2011
Introduction
Purpose This document is intended to provide a single point of reference for techniques and product behaviours when dealing with SAP NetWeaver Business Warehouse (SAP BW) as a data source in IBM Cognos 10. Applicability Generally speaking, the practices and methods noted within the IBM Cookbook for IBM Cognos 8.4 for use with SAP NetWeaver Business Warehouse are applicable to
Copyright IBM Corporation 2011 IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse Trademarks Page 1 of 25
developerWorks
ibm.com/developerWorks/
your IBM Cognos 10 on SAP BW environment. Hence the guidelines mentioned in this document can be considered an addendum, or delta practices, and are specific to IBM Cognos 10 with SAP BW. The techniques and product behaviours outlined in this document apply to: 1. IBM Cognos 10 version 10.1 2. SAP BW Query Designer version 7.0 Exclusions and Exceptions The techniques and product behaviours outlined in this document may not be applicable to previous or future releases.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 2 of 25
ibm.com/developerWorks/
developerWorks
As the example above illustrates, this SAP hierarchy represents retailers in different geographic locations. This illustration shows how the retailer located in the country of Algeria from the time period 01-01-2000 to 31-12-2004 has ceased operations at the end of 2004, and was replaced by new dealer located in Morocco, which started to log transactions in 01-01-2005. Notice in Figure 2, for the characteristic ZD_CCUST (Retailer) in SAP BW, under the Hierarchy tab, the option Time-Dependent Hierarchy Structure has been selected.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 3 of 25
developerWorks
ibm.com/developerWorks/
Since ZD_CCUST (Retailer) contains a time-dependent hierarchy structure, we can see in Figure 3 that for the hierarchy named Retailer TimeDep1, different validity dates are assigned for countries Algeria and Morocco.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 4 of 25
ibm.com/developerWorks/
developerWorks
IBM Cognos 10 allows users to visualize and interact with the SAP BW timedependent hierarchy structures. Notice in the image Figure 4, how the timedependent hierarchy structures are depicted in the IBM Cognos 10 Framework Manager model, and can be leveraged as alternate hierarchies within IBM Cognos 10 BI.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 5 of 25
developerWorks
ibm.com/developerWorks/
General Principles when Accessing Time-Dependent Hierarchy Structures Since the time-dependent hierarchy structures are depicted in the IBM Cognos 10 Framework Manager as alternate hierarchies, import only the definitions of the hierarchies you need. This will help to optimize the IBM Framework Manager import process when accessing metadata from SAP BW.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 6 of 25
ibm.com/developerWorks/
developerWorks
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
developerWorks
ibm.com/developerWorks/
IBM Cognos 10 configuration settings for all supported data sources. Administration features specific to DQM. IBM Cognos 10 caching. Debugging and troubleshooting the DQM.
These configuration entries resided in both sapbw_config.xml and qfs_config.xml in earlier versions of the product, and their usage has not altered since then. All other entries should be left unaltered unless specifically instructed by IBM Cognos Customer Support or Development. Tracing The XQEODP.CONFIG.XML file also contains the mechanism to trace some of the communications between the Query Service and SAP BW such as MDX statements and BAPI (Business Application Programming Interface) function calls used to retrieve metadata and data from the underlying systems. In order to perform this level of tracing, locate this section of the configuration file:
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 8 of 25
ibm.com/developerWorks/
developerWorks
<component name="SBWODP"> <eventGroup name="Configuration"/> <eventGroup name="Connection"/> <eventGroup name="Function"/> <eventGroup name="Metadata"/> <eventGroup name="DataQuery"/> <eventGroup name="Timing"/> <eventGroup name="Exception"/> </component>
Add level=info to an entry and restart the query service, and this will start recording the requested entries to the log file which is located under the logs\xqe directory. Each time the query service starts, a new file is created. The log files are prefixed with xqelog-<timestamp>.xml. For example, in order to trace some of the outgoing MDX statements, you would set the following entry:
<component name="SBWODP"> <eventGroup name="Configuration"/> <eventGroup name="Connection"/> <eventGroup name="Function"/> <eventGroup name="Metadata"/> <eventGroup name="DataQuery" level=info/> <eventGroup name="Timing"/> <eventGroup name="Exception"/> </component>
The most frequently used entries are DataQuery and Function. Those two entries will show most of the pertinent calls made to SAP BW which should be of concern. BW.PROPERTIES This file contains some of the entries dictating the default behavior of the query engine specifically for SAP BW. First and foremost, it must be stated that entries in this file should not be altered unless specifically instructed by Customer Support or Development. They are meant for very specific scenarios and their applications are server wide. With that said, two entries can be altered. The first entry is lolap.tupleStorageThreshold. This sets the maximum potential size of a tuple which we will store in the cache. The potential is calculated by multiplying the members received from each dimension requested from SAP BW. Should the potential size of the result exceed this limit, then IBM Cognos will not be caching the data results. Please note this only affects data cache (tuple storage) and not metadata cache. By default, this value is set to 150,000. This limit will easily be reached, therefore, we can increase the potential limit to 150,000,000. This does not mean that all tuples up to 150,000,000 will be stored in the cache as other heuristics are also considered by the engine. These other heuristics will avoid storing results which would be slower to write/read from the cache then reading directly from SAP BW (i.e. very large dense reports). The second entry which some may be interested in leveraging is use.valid.from=true. This will dictate whether the From date or the To date will be utilized when setting the KEYDATE for time-dependant hierarchies. Each timeIBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse Page 9 of 25
developerWorks
ibm.com/developerWorks/
dependant hierarchy contains a validity period which is stored in the model /package. When authoring a report against such hierarchies, prior to executing a report, IBM Cognos will set the key date based on these stored periods. By default (true), the From date will be used. Changing the value to false will have the following effect: 1. If no values exist for To -> the current date is used as key date. 2. Values exist only for To -> To date is used as key date. 3. Values exist for both From and To -> To date is used as key date. The validity period of time-dependant hierarchies can be found in the IBM Cognos Framework Manager model. In the left hand pane, select the concerned hierarchy and note the two properties: Valid_From and Valid_To. Advanced Environment Settings In IBM Cognos 10, all optional SAP prompts of a SAP BW InfoQuery are prompted by default, and all will be revealed in an IBM Cognos prompt page unless they are explicitly called and hidden from an IBM Cognos report. However, you do have the ability to change this default behavior with an advanced server property that will hide the optional variables without having to explicitly call the optional SAP variables in an IBM Cognos report. The property called RSVP.PROMPT.FORCEDATASOURCEPARAMETERPROMPT must be set to FALSE to hide the optional SAP variables. Step by Step for changing the Advanced Environment Settings To change the default parameter value, and set the parameter to FALSE, perform the following steps. 1. Go to IBM Cognos Administration -> Configuration -> Dispatchers and Services. Figure 5: IBM Cognos Administration for Dispatchers and Services
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 10 of 25
ibm.com/developerWorks/
developerWorks
2. Click on the dispatcher URL. 3. For the ReportService, choose the Properties link. Figure 6: View the properties of the ReportService
5. For the row labeled Environment, Advanced Settings, choose Edit. Figure 8: Edit the advanced settings
6. Click the checkbox option to Override the settings acquired from the parent entry. A parameter input screen will then appear. 7. Set the following parameter to FALSE to hide optional SAP variables. RSVP.PROMPT.FORCEDATASOURCEPARAMETERPROMPT (default is TRUE) Figure 9: Setting this parameter to FALSE will hide optional SAP variables
ibm.com/developerWorks/
ibm.com/developerWorks/
developerWorks
7. To simplify reporting for end users, build a IBM Cognos Framework Manager package fit for purpose with only one data source. For example, deliver a package that delivers only what the users need from a data source, rather than allowing them to see all available content. And consider hiding or omitting elements, such as several alternate hierarchies, which they do not need. This approach will help to alleviate user-confusion and mitigate the probability that users will attempt to view unnecessarily high volumes of data which may provide slower performance. 8. Bring dimension levels into the report as opposed to display attributes to improve the initial response from SAP BW when the data is not cached with DQM. However, if the same display attribute is requested later, performance should be greatly improved as the data will reside in the DQM cache for users who have the same SAP BW security profiles. 9. When building a report and you do not want data to refresh as each column is brought in, create the reports in Page Design mode found in the View menu. (View -> Page Design).
developerWorks
ibm.com/developerWorks/
3.
4. 5. 6.
7.
8.
9.
within Cognos Administration and the steps to change are noted below in this section. Import metadata from SAP BW queries rather than selecting the cube. This will provide users the ability to leverage SAP BW objects not otherwise available from the cube, such as calculated and restricted key figures, query structures, filters, and variables. This practice is aligned with the proven practices as stated for IBM Cognos Framework Manager and SAP BW. When publishing a new package, select the option Use Dynamic Query Mode. SSPW users should strongly consider saving their packages to their My Folders directory or other dedicated directories to avoid package clutter in the Public Folders directory. With SSPW, you have the option to select at the cube or SAP BW query level, and definitions of any objects under those levels will be imported. For those SAP BW queries that call several alternate hierarchies or dimensions that are not necessary for reporting, consider importing SAP BW metadata using IBM Cognos Framework Manager where you have the option to select only the hierarchies that you need. This method can help expedite the import process. Consider use by IT and business users within test environments to enable users to build their own models and assist with requirements gathering. This practice could help to accelerate requirements gathering, development, and regression testing processes for required SAP BW reports and analysis as business users could be more involved. Any package created using the SSPW cannot be changed with IBM Cognos Framework Manager after the package is published. To change an existing package with SSPW, a user will need to re-import the SAP BW InfoQuery and then over-write the existing package. Another option is to recreate and overwrite the package using IBM Cognos Framework Manager. In the event it is required that updates to the package will be necessary on a iterative basis, consider using IBM Cognos Framework Manager where there is more control to include or omit objects that are necessary for the package and reports. In the event a package has been created with SSPW where the SAP BW InfoQuery is changed after the package was created, there could be ramifications to existing reports that were built on the package. It may be necessary to re-import the SAP BW InfoQuery with SSPW or IBM Cognos Framework Manager to get the latest definitions, and then over-write the existing package. Also note that in this case, existing reports should be analyzed to see if changes are necessary.
Using the Self-Service Package Wizard The following section provides a step by step overview of using the Self-Service Package Wizard to create a package. 1. To enable this feature, the Cognos Administrator must update the SAP BW connection properties to allow personal packages. This step is done in IBM Cognos Administration -> Configuration -> Data Source Connections.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse Page 14 of 25
ibm.com/developerWorks/
developerWorks
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 15 of 25
ibm.com/developerWorks/
3. A window opens showing all SAP BW data sources available. Select the SAP BW data source containing the data required, and click OK. Figure 14: The SAP BW connection appears within the wizard
4. Specify the name and location of the new package. It is recommended that users save their packages to My Folders to avoid user confusion and clutter in the Public Folders.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 16 of 25
ibm.com/developerWorks/
developerWorks
Figure 15: The user has chosen to save the package to My Folders
5. Find and select the appropriate SAP BW InfoQuery required, and leave the default option to Enable SAP BW Dual Structures support. Click Next. It is recommended to choose a query rather than the cube. This provides users the ability to leverage SAP BW objects not otherwise available from the cube, such as calculated and restricted key figures, query structures, filters, and variables.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 17 of 25
developerWorks
ibm.com/developerWorks/
Figure 16: The user has selected the SAP BW InfoQueries for the package
6. Choose to import any languages that are supported within your SAP BW environment. Confirm the design language, and click Next.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 18 of 25
ibm.com/developerWorks/
developerWorks
7. Choose the option for Use Dynamic Query Mode to leverage DQM and its query caching capabilities for improved response times and performance. Optionally choose the Object display name of your choice. Note the display name chosen should be supported and available within your SAP BW data source. And to have objects in the model organized the same way that they are organized in SAP Business Explorer Query Designer, select the Enhance model for SAP BW organization of objects option. You will then have a folder for each dimension. Note this selection is purely optional for visual purposes only, and is a matter of personal preference. You may choose this option to accommodate those users who are familiar with the SAP Business Explorer tools. Click Finish.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 19 of 25
developerWorks
ibm.com/developerWorks/
Figure 18: The user has chosen to 'Use Dynamic Query Mode' for better performance
8. If the SAP BW InfoQuery contains variables, you can choose to edit its properties by selecting to launch the SAP BW Edit Variables page. Do this by choosing the option to Edit the SAP BW variables for the package after closing this dialog , and then click Close.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 20 of 25
ibm.com/developerWorks/
developerWorks
9. If required, you can change the behavior of the variables via the Prompt Type property by using the dropdown menu.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 21 of 25
developerWorks
ibm.com/developerWorks/
A new package is ready to be used within IBM Cognos 10 so users may access data from SAP BW. Figure 21: The new package appears in 'My Folders' as defined
Update Default Settings to Control Import Limits IBM Cognos Administrators may want to reduce the number of SAP BW queries or cubes a user can select to import SAP BW metadata beyond the default settings. By default, a user can select a maximum of two SAP BW cubes and five SAP BW InfoQueries. These governors can be set within the Dispatchers and Services tasks within IBM Cognos Administration. The following section outlines the steps necessary to reduce the limits, which will help to control the number of objects that are imported at one time for a package, and promote an optimized import of the SAP BW metadata.
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse Page 22 of 25
ibm.com/developerWorks/
developerWorks
1. Go to IBM Cognos Administration -> Configuration -> Dispatchers and Services. Figure 22: IBM Cognos Administration for Dispatchers and Services
2. Click on the dispatcher URL. 3. For the MetadataService, choose the More link. 4. Select Set Properties, and then the Settings tab. Figure 23: View Settings
5. For the row labeled Environment, Advanced Settings, choose Edit. Figure 24: Edit the advanced settings
6. Click the checkbox option to Override the settings acquired from the parent entry. A parameter input screen will appear. 7. Add the following parameters to specify the value for maximum number of SAP BW cubes or SAP BW InfoQueries. com.ibm.cognos.metadatauiservice.sap.maxcubes (default value is 2) com.ibm.cognos.metadatauiservice.sap.maxInfoQueries (default value is 5)
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 23 of 25
developerWorks
ibm.com/developerWorks/
Figure 25: Insert parameters to define the limit for SAP BW InfoQueries and cubes
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 24 of 25
ibm.com/developerWorks/
developerWorks
Rich Borucki Rich Borucki is a Cognos Solution Specialist with SAP subject matter expertise in which he has a detailed understanding of the technical integration of IBM Cognos with SAP applications. One of his roles for the past two years is to drive customer successes and help Cognos customers by developing materials such as this cookbook as support for their IBM Cognos implementations with SAP applications. In his combined 10 years at IBM, he has also served as a SAP BW developer and managing consultant delivering SAP BW implementations to IBM customers.
Pierre Valiquette Pierre Valiquette is a Software Engineer within the IBM Cognos SAP BW development team. His primary role consists of bridging the gap between the SAP BW development team, IBM Cognos Support organization, and the customer base. Pierre has been involved for 13 years in the Ottawa Lab in various capacities from Customer Support to Development. His main focus throughout has always been a customer facing one. Copyright IBM Corporation 2011 (www.ibm.com/legal/copytrade.shtml) Trademarks (www.ibm.com/developerworks/ibm/trademarks/)
IBM Cognos Proven Practices: IBM Cookbook for IBM Cognos 10 for use with SAP NetWeaver Business Warehouse
Page 25 of 25