4155b345-0a01-0010-ac9f-b3b2c34e993c

18
 How-to Guide SAP NetWeaver ‘04s How To … Model SAP BI System Hierarchies in Visual Composer Version 1.01 – July 2006  Applicable Release s: SAP NetWeaver ’04s SPS07 or higher 

Upload: talk2parimi

Post on 04-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 1/18

 

How-to GuideSAP NetWeaver ‘04s 

How To …Model SAP BISystem Hierarchiesin Visual Composer Version 1.01 – July 2006

 Applicable Releases:SAP NetWeaver ’04s SPS07 or higher 

Page 2: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 2/18

 © Copyright 2006 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose withoutthe express permission of SAP AG. The informationcontained herein may be changed without prior notice.

Some software products marketed by SAP AG andits distributors contain proprietary softwarecomponents of other software vendors.

Microsoft, Windows, Outlook, and PowerPoint

 are

registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, ParallelSysplex, MVS/ESA, AIX, S/390, AS/400, OS/390,OS/400, iSeries, pSeries, xSeries, zSeries, z/OS,

 AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli,

and Informix are trademarks or registeredtrademarks of IBM Corporation in the United Statesand/or other countries.

Oracle is a registered trademark of OracleCorporation.

UNIX, X/Open, OSF/1, and Motif are registeredtrademarks 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 SunMicrosystems, 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, SAPNetWeaver, and other SAP products and servicesmentioned herein as well as their respective logosare trademarks or registered trademarks of SAP AGin Germany and in several other countries all over the world. All other product and service namesmentioned are the trademarks of their respectivecompanies. Data contained in this document servesinformational purposes only. National productspecifications may vary.

These materials are subject to change withoutnotice. These materials are provided by SAP AG andits affiliated companies ("SAP Group") for informational purposes only, without representationor warranty of any kind, and SAP Group shall not beliable for errors or omissions with respect to thematerials. The only warranties for SAPGroup products and services are those that are set

forth in the express warranty statementsaccompanying such products and services, if any.Nothing herein should be construed as constitutingan additional warranty.

These materials are provided “as is” without awarranty 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 kindincluding without limitation direct, special, indirect, or consequential damages that may result from the use

of these materials.SAP does not warrant the accuracy or completenessof the information, text, graphics, links or other itemscontained within these materials. SAP has no controlover the information that you may access through theuse of hot links contained in these materials anddoes not endorse your use of third party web pagesnor provide any warranty whatsoever relating to thirdparty web pages.SAP NetWeaver “How-to” Guides are intended tosimplify the product implementation. While specificproduct features and procedures typically areexplained in a practical business context, it is not

implied that those features and procedures are theonly approach in solving a specific business problemusing SAP NetWeaver. Should you wish to receiveadditional information, clarification or support, pleaserefer to SAP Consulting.

Page 3: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 3/18

 

1 Business Scenario

You have hierarchies enabled in an SAP BI system query, and you’d like to useVisual Composer to model hierarchy display and limited navigation into aninteractive application which you deploy into Adobe Flash format on the portal.

2 Introduction

This document provides detailed instructions on how to model hierarchies in VisualComposer. In a step-by-step example, we show you how to visualize hierarchiesand define simple hierarchy navigation via modeling the elements in VisualComposer.

 As of the current release of Visual Composer in NetWeaver 2004s SPS07, VisualComposer’s table view element does not support a tree display, which is typically required for interactive hierarchy navigation. We explain a work-around solution inthis paper with which you can model limited hierarchy support.

Hierarchies are supported only using the SAP BI Connector to access an SAP BIsystem. SAP BI systems configured on the portal with the BI XMLA Connector or the BI ODBO Connector don’t support this hierarchy workaround.

2.1 Prerequisites

 All you need to model this scenario is delivered in SAP NetWeaver 2004s SPStack 07 or greater.

In particular:

•  SAP NetWeaver Visual Composer •  SAP NetWeaver BI System, with a user on this system:

SAP BW 3.5 systems SP15 or greater, or SAP BI systems 7.0 or greater.•  SAP BI System is defined with the SAP BI Connector in the Portal System

Landscape•  SAP BI query with hierarchy display enabled (see Enabling SAP BI System

Hierarchies, below)

Some knowledge of Visual Composer modeling and the SAP BI Web Design API ishelpful.

Page 4: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 4/18

 

There are different ways to create hierarchies in SAP NetWeaver BI. Thispaper assumes an entire hierarchy is constructed from one InfoObject(including the nodes). If the nodes in your hierarchy are from different

InfoObjects, are text nodes, or your underlying InfoObject is a referencedInfoObject, then you will need to adjust the Web API commands used in thispaper accordingly.

2.2 Enabling SAP BI System Hierarchies

Visual Composer relies on a hierarchy setting saved in an SAP BI query to knowthat a hierarchy is enabled for a characteristic. You can switch the display ofhierarchies on or off in Visual Composer by enabling or disabling this setting.Hence, before modeling the hierarchy solution in Visual Composer, we explain howhierarchies are defined in the SAP BI query.

1.  Launch the BEx Query Designer and open a query that contains acharacteristic that has a hierarchy associated with it. In our case, we start

 with SAP Demo query DalSegno Company Revenue Analysis  (0D_DX_M01_Q0002) and move the Industry Sector DB SIC characteristic(0D_DBSIC1) to the rows.

2.  Evoke the Properties dialog box for a characteristic (BW 3.5 systems) or 

display the Hierarchy tab on the Properties pane (BI 7.0 and above):

Page 5: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 5/18

 Figure 1 – Properties Æ Hierarchy Pane in Query Designer 7.0

3.  To enable hierarchy display, select the Activate Hierarchy Display checkbox(BI 7.0) or the Active checkbox in the Display Hierarchy section (BW 3.5).

4.  Save your query with the hierarchy active.

Note the technical name of the characteristic, in this case 0D_DBSIC1. We will

use this while modeling the hierarchy in Visual Composer.

Page 6: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 6/18

 

2.3 For More Information

•  For more information about the BEx Query Designer, see the onlinedocumentation at:

 → SAP NetWeaver  → SAP NetWeaver 2004s  → SAP 

NetWeaver by Key Capability  →  Information Integration by Key Capability  →  

Business Intelligence  → BI Suite: Business Explorer  → Query Design: BEx Query Designer  

•  For more information about the Web Design API for hierarchies, see the onlinedocumentation at:

  →  SAP NetWeaver  →  SAP NetWeaver 2004 →  

Information Integration  →  SAP Business Information Warehouse  →  BI Suite: 

Business Explorer  →  BEx Web  →  Web Application Design: BEx Web 

 Application Designer  →  Command URLs  →  Data Provider - Commands  →  Operations for Display Hierarchies 

Page 7: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 7/18

3 The Step By Step Solution

To model hierarchies in Visual Composer, we perform these steps:•

  Model the basic elements•   Add drill buttons to the table view•  Program the drill down action•  Program the drill up action•  Deploy the model and interact with the application in the portal

3.1 Model the Basic Elements

1.  Launch Visual Composer in theportal in which your hierarchy-enabled query is saved.

2.  Open an existing model in which tomodel the hierarchy, or create anew model.

3.  Navigate into an existing iView or create a new one and navigate intoit.

4.  From the Find Data Services panel,select the SAP BI system in which

 your query is located, and locate

the query that contains thehierarchy-enabled characteristic.

Page 8: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 8/18

For background, note that for eachhierarchy-enabled characteristic, twoadditional fields are created in theResult folder for an SAP BI query.

In our example, the fieldsIndustry_Sector_DB_SIC_node_level  andIndustry_Sector_DB_SIC_node_status  are generated because theIndustry_Sector_DB_SIC characteristichas hierarchy display enabled. Thefields provide the following hierarchy functionality:

•  Industry_Sector_DB_SIC_node_

level provides the value for thehierarchy node level of theselected row. The root node islevel 1.

•  Industry_Sector_DB_SIC_node_status provides the value thatcorresponds to the hierarchy node drill state:

o  E – expanded

o  C – collapsedo  L – leaf node

5.  Drag the query to the VisualComposer storyboard.

6.  Connect a start point to its Input  port.

7.  Connect a table view to its Output  port, and select the fields you want

to display in the table. Make surethat your hierarchy-enabledcharacteristic is selected as one ofthe fields (you do NOT need toselect the special * _node_level and* _node_status fields).

Page 9: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 9/18

3.2 Add Drill Buttons to the Table View

8.  Double-click the table view toaccess the Configure Elementtask panel.

9.  Select Show in the Toolbar  dropdown list to enable toolbar display for the table.

Next, we model two buttons that will perform hierarchy navigation.

10. Click Edit to edit the toolbar.11. In the Create Toolbar Buttons  

dialog box, click the Add Button  button to create two buttons

 with the following settings:

Button name =Drill Down Action type =Custom actionCustom action =DRILLDOWN

Button name =Drill Up Action type =Custom ActionCustom action =DRILLUP

12. Click OK to save the toolbar  with the new buttons and closethe dialog box.

Page 10: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 10/18

3.3 Program the Drill Down Action

13. On the Storyboard, drag aline to connect the Out portof the table view to the Input  

port of the query.14. Select this line, and in the

Configure Element taskpanel, select drilldown fromthe Event name dropdownlist.

15.  At the bottom of the taskpanel, select the AssignedValue column next to the

WEBAPI field, and in thedropdown list, select Enter formula:  

16. In the Assign Value dialogbox, enter the Web Design

 API commands that will drillto the second hierarchy leveland at the same time filter by the selected hierarchy node.

Start with the formula to theright as a template:

'FILTER_NODE_IOBJNM=CHAR_TECH_NAME;FI

LTER_VALUE='&CHAR_key&';FILTER_COLLAP

SE=

;FILTER_IOBJNM=CHAR_TECH_NAME;CMD_1=CMD%3DDRILL_TO_LEVEL%26LEVEL%3D2%26IOB

JNM%3DCHAR_TECH_NAME%26DATA_PROVIDER%

3DDP;' 

Page 11: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 11/18

(Note: There is a space after FILTER_COLLAPSE)

See Prerequisites sectionabove for notes, and

 Appendix: SAP BI WebDesign API Commands for more Web API information.

17. Replace the three instancesof CHAR_TECH_NAME withthe technical name for your characteristic (in our case,0D_DBSIC1 – see EnablingSAP BI System Hierarchies, above).

CHAR_key represents the key of the currently selectedcharacteristic member. Youreplace this with your value,prefixed with the ID of the table

 view, by using the data fieldsprovided:

18. Expand the Data Fields  node, then expand theOutput Table node.

19. Drag the key field of your hierarchy-enabledcharacteristic into the texteditor and place it in thecorrect location in theformula.

Page 12: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 12/18

 At this point, your formula lookssomething like what’s to theright.

20. Click Check to validate the

formula, and if valid, click OK  to save the changes andclose the dialog box.

3.4 Program the Drill Up Action

21. Repeat steps 13-20 to createa drill up event. At step 16,use the Web Design API

command to drill to the levelof the currently selectedhierarchy node, withoutfiltering.

Start with the formula to theright as a template:

22. Just as with the drill downcommands, replaceCHAR_TECH_NAME with thetechnical name for your characteristic (it appears inone place).

'CMD_1=CMD%3DDRILL_TO_LEVEL%26LEVEL%

3D'&NSTR(CHAR_node_level,'B')&'%26IOBJNM%3DCHAR_TECH_NAME%26DATA_PROVIDE

R%3DDP;' 

CHAR_node_level representsthe node level of the currently selected characteristic member.Replace it with the right node

level field of your table view:

23. Expand the Data Fields node,then expand the Output Table node.

24. Drag the node level field of your hierarchy-enabledcharacteristic into the text

Page 13: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 13/18

editor and place it in thecorrect location in theformula.

 At this point, your formula lookssomething like this: 

25. Save your model.

When your model iscomplete, with the commandsmodeled for both drill downand drill up, the Storyboardlooks something like this:

Page 14: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 14/18

3.5 Deploy the Model and Interact With the Application in the Portal

26. Deploy the model (to Adobe Flash format).27. Launch the iView:

In runtime on the portal, hierarchy nodes are displayed using indentation and special

flags for drill states:•  Root nodes: Aligned fully left•  Subnodes: Indented•  Nodes that are expanded: Prefaced with "-"•  Nodes that are collapsed: Prefaced with "+"

In our case, the root SIC Hierarchy node is expanded by default.

Page 15: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 15/18

28. Select a node that is collapsed (prefaced with "+"), and click the Drill Down button:

The node expands and its subnodes are displayed beneath it:

Page 16: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 16/18

You can continue drilling down into collapsed subnodes until they are fully expanded:

Page 17: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 17/18

29. Select an expanded node (prefaced by "-") and click the Drill Up button to drill backup. You can continue drilling up until all nodes are collapsed:

Using SAP BI Web Design API commands in procedures similar to the above, you canbuild additional hierarchy support into your model. For example, you can add a buttonthat drills to level "X " (where you provide an input field for "X ").

Page 18: 4155b345-0a01-0010-ac9f-b3b2c34e993c

7/30/2019 4155b345-0a01-0010-ac9f-b3b2c34e993c

http://slidepdf.com/reader/full/4155b345-0a01-0010-ac9f-b3b2c34e993c 18/18

4 Appendix: SAP BI Web Design API Commands

The most relevant Web Design API commands for hierarchy support are outlined

below. For more details, see the SAP BI Web Design API documentation (see For More Information, above).

•  Use the DRILL_TO_LEVEL command to expand the display hierarchy up tothe specified hierarchy level:

Parameter DescriptionIOBJNM Name of characteristic

Characteristic, to which an activedisplay hierarchy is assigned.

LEVEL Hierarchy levelLevel to which you want to expandthe hierarchy. Level 1 is the rootlevel. If a hierarchy node is filtered atthe same time, make sure that thelevel is higher than the level of thefiltered node.

•  Use the following Web Design API commands to filter hierarchy nodes:Parameter DescriptionFILTER_IOBJNM Name of the characteristic /

structure by which the system is tofilter 

FILTER_COLLAPSE

‘X’ = Yes, ‘ ’ = NoRemoving filter characteristics fromthe drilldownThe characteristics that are specifiedunder FILTER_IOBJNM are takenfrom the axes after the filter hasbeen applied. If you do not specify the parameters, the system assumes

 you want to use the value ‘X’ = Yes.FILTER_NODE_IOBJNM Node characteristic name

This parameter must be specified ifthe system filters by hierarchy nodes.

FILTER_VALUE Hierarchy node name