This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
BusinessObjects Integration Kit for SAP - Crystal Reports 2008
Applies to: Crystal Reports 2008, BusinessObjects Integration Kit for SAP Solutions
Summary This document outlines the required steps to install and configure BusinessObjects Enterprise in combination with SAP NetWeaver BI.
Author: Ingo Hilgefort
Company: Business Objects, an SAP company
Created on: 01 October 2008
Author Bio Ingo Hilgefort started in 1999 with Seagate Software / Crystal Decisions as a Trainer and Consultant.
He moved to Walldorf for Crystal Decisions by end of 2000 and worked with the SAP BI Development team on integrating Crystal Reports with SAP BW. He then relocated to Vancouver in the year 2004 and worked as Product Manager / Program Manager (Engineering) on the integration of Business Objects products with SAP products.
He is now focusing on the topic of Embedded Analytics for the SAP Solutions.
BusinessObjects Integration Kit for SAP - Crystal Reports 2008
Table of Contents SAP as a Datasource for Crystal Reports ..........................................................................................................3 SAP BW Metadata in Crystal Reports ................................................................................................................4
Dimension and Characteristics .......................................................................................................................5 Display attributes and Navigational Attributes ................................................................................................7 Keyfigures, Units, and Currencies ..................................................................................................................9 Hierarchies ....................................................................................................................................................10
Crystal Reports with simple SAP BW queries ..................................................................................................11 Creating Crystal Reports Using the SAP Toolbar.........................................................................................11 Creating Crystal Reports Using the Database Explorer ...............................................................................15
Creating your First Report with Crystal Reports on Top of SAP BI ..................................................................22 Insert a Field .................................................................................................................................................26 Insert Additional Fields..................................................................................................................................27 Preview the Report........................................................................................................................................28 Resize Fields.................................................................................................................................................30 Change Field Headings.................................................................................................................................31 Add Summary Information ............................................................................................................................31 Add a title ......................................................................................................................................................33 Format an Object ..........................................................................................................................................34 Grouping & Charting .....................................................................................................................................36 Save the Report ............................................................................................................................................38
Creating your First Report with Hierarchies from SAP BI.................................................................................39 Formulas for Hierarchical Reporting .............................................................................................................48
Formula Hierarchy Level ............................................................................................................................................48 Count Hierarchical Children .......................................................................................................................................48
Conditional Formatting with Hierarchy Level ................................................................................................49 Copyright...........................................................................................................................................................52
BusinessObjects Integration Kit for SAP - Crystal Reports 2008
SAP BW Metadata in Crystal Reports
When connecting to a SAP BI query with Crystal Reports the underlying metadata from the SAP BI query is leveraged and matched to Crystal Reports elements.
The table below shows how SAP BI metadata is used in Crystal Reports.
BW Query element Crystal Reports designer element
Characteristic Separate fields for key and description per characteristic.
Hierarchy Fields representing a parent-child relationship.
Keyfigure Measure element in a grouping called Keyfigure. Each Keyfigure can have up to three elements: numeric value, unit, and formatted value.
Calculated Keyfigure Measure element in the folder Keyfigure. (Information about the details of the calculated keyfigure is not available in Crystal Reports.)
Restricted Keyfigure Measure element in the folder Keyfigure (Information about the details of the restricted keyfigure is not available in Crystal Reports.)
Filter Filters will be applied to the underlying query but are not visible in the Crystal Reports designer.
Navigational attribute Separate fields for key and description per navigational attribute.
Display attribute Each display attribute becomes one field in the field explorer. The display attributes are grouped together with the actual characteristic.
BusinessObjects Integration Kit for SAP - Crystal Reports 2008
Dimension and Characteristics
The image shows an SAP BI query in the BEx Query Designer.
The rows of this query include several characteristics and the columns several keyfigures. On the left side, the actual cube structure is shown with the cube dimensions (not to be confused with characteristics).
BusinessObjects Integration Kit for SAP - Crystal Reports 2008
Building a Crystal Report on top of such an SAP BW query will result in the following elements:
• Each characteristic in the query will result in an element in the field explorer with a key and a description item (Example: City Key and City Name).
• In addition each characteristic will also generate a Node ID and a Parent Node ID which can be used for hierarchical reporting.
• Each characteristic will also generate a Member Unique Name field which represents the technical key value.
BusinessObjects Integration Kit for SAP - Crystal Reports 2008
In addition the BW query contains three navigational attributes in the rows: Regional Code, Postal Code, and Area Code.
A navigational attribute can easily be identified by the double underscore (“__”) in the technical name of the navigational attribute.
Building a Crystal Report object on top of such an SAP BW query will result in the following elements:
• Each characteristic in the query will result in an element in the field explorer with a key and a description field.
• Each navigational attribute in the query will result in an element in the field explorer with a key and a description item (for example, Regional Code and Area Code).
• Each display attribute will create an element in the field explorer underneath the corresponding characteristic (for example, Customer number with several display attributes).
• Crystal Reports will include all available display attributes for the characteristic and not only the display attributes that are included in the SAP BW query.
BusinessObjects Integration Kit for SAP - Crystal Reports 2008
Keyfigures, Units, and Currencies
Each keyfigure used in an SAP BW query can have up to three elements:
• Numeric value of the keyfigure. • Unit or currency information. • Formatted value, representing the user-specific formatting.
The image shows the result of two keyfigures in Crystal Reports:
• Each keyfigure is represented with a field in a group called Key Figures. • In the case the keyfigure is configured in SAP BW with a unit, an additional field will be added
representing the unit information.
• The Formatted Value represents the numeric value formatted as a string value following the user-specific formatting settings.
BusinessObjects Integration Kit for SAP - Crystal Reports 2008
Hierarchies
Hierarchies can be activated for characteristics in the BEx Query Designer and offer the user the capability to navigate along a hierarchical structure.
The image shows the field explorer in Crystal Reports based on an SAP BW query with a hierarchy.
• A hierarchy results in a parent-child relationship.
BusinessObjects Integration Kit for SAP - Crystal Reports 2008
Crystal Reports with simple SAP BW queries
Creating Crystal Reports Using the SAP Toolbar
The SAP specific toolbar and the SAP specific menu items offer the user the typical SAP open and save dialogs that are also used in the Business Explorer and allow the user to store the Crystal Report object directly into SAP BW roles.
The following table shows all available menu options of the SAP toolbar:
Button Command Function
Create a new report from SAP BW Query
Creates a new report based on an SAP BW query that is already defined.
Open Report Opens a Crystal Report file from SAP BW.
Save Report Saves the current report to SAP BW.
Save Report as Saves the report to BW with the option to define a new name or choose a different SAP BW role.
Start SAP BW Query Designer
Starts the SAP BW Query Designer.
Disconnect Closes the current connection to SAP BW.
Settings Allows configuring settings for the connectivity to SAP
BW. The settings are specific for the Crystal Reports designer installation.
BusinessObjects Integration Kit for SAP - Crystal Reports 2008
As part of the settings available in the SAP toolbar the report designer can choose to use the SAP BW MDX driver for creating new reports against SAP BW.
It is highly recommended to use the BW MDX driver. The BW Query driver does not support multiple structures of a BW query and does not support display attributes.
The SAP connectivity is listed as part of all available connectivity – sorted alphabetically.
4. Double-click SAP BW MDX Query. The SAP BW MDX Query connectivity is the more enhanced version of the Crystal Reports connectivity towards SAP BW cubes and SAP BW queries.
BusinessObjects Integration Kit for SAP - Crystal Reports 2008
Formulas for Hierarchical Reporting
Crystal Reports designer offers some additional formulas and functions that allow the user to create a better report design and provide conditional formatting even in the context of a hierarchy.
Formula Hierarchy Level
The first formula for hierarchical reporting is the formula HierarchyLevel(). The formula HierarchyLevel() allows retrieving the level of the hierarchical grouping.
The formula needs a GroupLevel as input.
The following is an example for the formula syntax assuming Country Node ID is the grouping field in the report:
HierarchyLevel (
GroupingLevel ( {Country Node ID})
)
Count Hierarchical Children
The second formula is CountHierarchicalChildren() which allows counting the number of children of a hierarchy level. The formula needs a GroupLevel as input.
The following is an example for the formula syntax assuming Country Node ID is the grouping field in the report:
CountHierarchicalChildren (
GroupingLevel ({Country Node ID})
)
The count of children refers to the number of children in the hierarchy level.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, System i, System i5, System p, System p5, System x, System z, System z9, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, POWER5+, OpenPower and PowerPC are trademarks or registered trademarks of IBM Corporation.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.
MaxDB is a trademark of MySQL AB, Sweden.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.
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.
Any software coding and/or code lines/strings (“Code”) included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.