Upload
others
View
30
Download
0
Embed Size (px)
Citation preview
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 1
How to Display Traffic Lights for
Exceptions in BI Web Reports
Applies to:
SAP BI 7.0. For more information, visit the Analytics homepage.
Summary
In a BI Web Report, it would look much better to display the Status as Traffic lights rather than displaying cell background colors. This article explains with screenshots the procedure for displaying Exceptions as Traffic light icons. The procedure discussed in this document can also be used to display Custom images (in place of Exceptions) in the BI Web Report.
Author: Hari Krishnan K.
Company: Allianz Cornhill Information Services (ACIS)
Created on: 12 August 2010
Author Bio
Hari Krishnan K is a SAP Certified Solution Consultant in SAP Netweaver 04 – Business Intelligence with six years of experience in SAP BI. Currently he is working with Allianz Cornhill Information Services.
How to Display Traffic Lights for Exceptions in BI Web Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 2
Table of Contents
How to Display Traffic Lights for Exceptions in the Web Reports ...................................................................... 3
Pre-Requisites ................................................................................................................................................. 3
Procedure ........................................................................................................................................................ 4
The HTML Code generated in the Web Application Designer ...................................................................... 10
Related Content ................................................................................................................................................ 11
Disclaimer and Liability Notice .......................................................................................................................... 12
How to Display Traffic Lights for Exceptions in BI Web Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 3
How to Display Traffic Lights for Exceptions in the Web Reports
In a Status Web Report, it would look much better to display the Status as Traffic lights rather than displaying cell background colors.
Comparison - Status as Traffic Lights and Background Colors
This can be done by Web Item Analysis Modification.
Features of Web Item Analysis Modification
Web Item Analysis Modification is a Java interface in BI 7.0.
Customizable samples are delivered by SAP (so-called modules).
These modules could be configured by parameters in the BEx Web Application Designer.
Samples provided by SAP for Web Item Analysis Modification are
1) Exception Image module (com.sap.ip.bi.rig.ExceptionImage)
To display custom exception symbols / images in Web Reports.
2) Column Width module (com.sap.ip.bi.rig.ColumnWidth)
Enables the definition of the column width in the Analysis Web item.
3) Document Content module (com.sap.ip.bi.rig.DocumentContent)
Enables the display of document content in a cell in the Analysis Web item.
4) Negative Number module (com.sap.ip.bi.rig.NegativeNumber)
Depicts negative numbers in a column or entire table in red.
Our requirement is to set the Status as Traffic Lights. So we will be using the module com.sap.ip.bi.rig.ExceptionImage.
Pre-Requisites
This article assumes that the required configuration has been done for Web Reporting using Web Application Designer and the Analysis Web Item has been included in the web template. An exception has to be defined and it should be Active in the Query assigned to the Analysis web item.
How to Display Traffic Lights for Exceptions in BI Web Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 4
Procedure
In the Web Application Designer,
Select the Analysis Web Item -> Web Item Parameters -> Internal Display.
Select Modification -> Single Module
Click on the button next to Single module
Select Type as Generic Module and click on the button below that.
The Active checkbox should be selected.
Implementation Name should be com.sap.ip.bi.rig.ExceptionImage.
Click on the parameter button.
We will be providing the Parameter Name/Expression and Value here.
How to Display Traffic Lights for Exceptions in BI Web Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 5
Give Parameter Name/Expression as ALERT_X, where X is the Alert number of the Exception defined in the Query. The mapping is as given below.
ALERT_1 equates to Good 1 ALERT_2 equates to Good 2 ALERT_3 equates to Good 3 ALERT_4 equates to Critical 1 ALERT_5 equates to Critical 2 ALERT_6 equates to Critical 3 ALERT_7 equates to Bad 1 ALERT_8 equates to Bad 2 ALERT_9 equates to Bad 3
The Exception we have defined in the query is
Good 3 Green
Critical 1 Yellow
Bad 2 Red
So the corresponding alerts will be
ALERT_3 for Green
ALERT_4 for Yellow
ALERT_8 for Red
Select IMAGE from the dropdown box for the field ‘VALUE’, since we want to display traffic light icons (gif) for the exception in the web report.
Select the Image from the MIME Repository or through an URL.
The Icons will be stored in the path shown in the screenshot below.
How to Display Traffic Lights for Exceptions in BI Web Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 6
Transaction SE80 -> Mime Repository
SAP -> BW -> BEx -> Icons
We will be using the Traffic light images stored in Icons folder in MIME Repository.
The icons we will be using for this scenario are
Green - s_s_ledg.gif, Yellow - s_s_ledy.gif and Red - s_s_ledr.gif
You can directly give the icon link in Mime Repository Resource field or you can select the icon from the MIME browser.
I have noticed that sometimes even if we select the images through the browser, it won’t be inserted in the Mime Repository Resource field. If this happens, we can directly provide the link of the icons stored in the MIME Repository.
For example:
Green bwmimerep:///sap/bw/mime/BEx/Icons/s_s_ledg.gif
Yellow bwmimerep:///sap/bw/mime/BEx/Icons/s_s_ledy.gif
Red bwmimerep:///sap/bw/mime/BEx/Icons/s_s_ledr.gif
How to Display Traffic Lights for Exceptions in BI Web Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 7
(Here we have the option to use custom images also. But before that the image should be uploaded to the MIME Repository.)
So we have defined the Green Traffic light symbol for ALERT_3. Similarly define the Alerts to display Yellow and Red as shown in the screenshots below.
ALERT_4 - Yellow
How to Display Traffic Lights for Exceptions in BI Web Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 8
ALERT_8 - Red
Select OK after defining all the required parameters (Green, Yellow and Red).
How to Display Traffic Lights for Exceptions in BI Web Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 9
Now we have to set the Exception Visualization (EXCEPTION_RENDERING) parameter to Symbols for the Analysis Web Item. This parameter is used to specify the display type for exceptions. The Exception Visualization drop down is in the Cell Content Area of the Analysis Web Item.
Save the web template and execute the Report.
Now the report output will be showing the Traffic lights in place of the background cell colors.
Isn’t it better than displaying background colors?
The default option for Exception Visualization parameter is Color. So if this is not set to display Symbols, the Report will display Exception Colors along with Traffic lights in the cell background as shown in the screenshot below.
If the key figure value also has to be displayed in the report along with the Traffic lights, select the option ‘Text and Symbol’ in Exception Visualization dropdown.
How to Display Traffic Lights for Exceptions in BI Web Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 10
The HTML Code generated in the Web Application Designer
<bi:ANALYSIS_ITEM name="ANALYSIS_ITEM_2" designwidth="400" designheight="200" >
<bi:DATA_PROVIDER_REF value="DP_1" />
<bi:MODIFICATION type="CHOICE" value="MOD_SINGLE_MODULE" >
<bi:MOD_SINGLE_MODULE type="COMPOSITE" >
<bi:MOD_SELECT type="CHOICE" value="MOD_GENERIC_MODULE" >
<bi:MOD_GENERIC_MODULE type="COMPOSITE" >
<bi:MOD_REFERENCE
value="com.sap.ip.bi.rig.ExceptionImage" />
<bi:MOD_PARAMETER_LIST type="ORDEREDLIST" >
<bi:MOD_PARAMETER type="COMPOSITE" index="1"
>
<bi:MOD_PLACEHOLDER_LIST
type="ORDEREDLIST" />
<bi:MOD_PARAM_NAME value="ALERT_3" />
<bi:MOD_PARAM_VALUE type="CHOICE"
value="IMAGE" >
<bi:IMAGE
value="bwmimerep:///sap/bw/mime/BEx/Icons/s_s_ledg.gif" />
</bi:MOD_PARAM_VALUE>
</bi:MOD_PARAMETER>
<bi:MOD_PARAMETER type="COMPOSITE" index="2"
>
<bi:MOD_PARAM_NAME value="ALERT_4" />
<bi:MOD_PARAM_VALUE type="CHOICE"
value="IMAGE" >
<bi:IMAGE
value="bwmimerep:///sap/bw/mime/BEx/Icons/s_s_ledy.gif" />
</bi:MOD_PARAM_VALUE>
<bi:MOD_PLACEHOLDER_LIST
type="ORDEREDLIST" />
</bi:MOD_PARAMETER>
<bi:MOD_PARAMETER type="COMPOSITE" index="3"
>
<bi:MOD_PARAM_NAME value="ALERT_8" />
<bi:MOD_PARAM_VALUE type="CHOICE"
value="IMAGE" >
<bi:IMAGE
value="bwmimerep:///sap/bw/mime/BEx/Icons/s_s_ledr.gif" />
</bi:MOD_PARAM_VALUE>
</bi:MOD_PARAMETER>
</bi:MOD_PARAMETER_LIST>
</bi:MOD_GENERIC_MODULE>
</bi:MOD_SELECT>
<bi:ACTIVE value="X" />
</bi:MOD_SINGLE_MODULE>
</bi:MODIFICATION>
<bi:ANALYSIS_ITEM_MODE type="CHOICE" value="AIM_AUTOMATIC" />
<bi:EXCEPTION_RENDERING value="SYMBOL" />
</bi:ANALYSIS_ITEM>
How to Display Traffic Lights for Exceptions in BI Web Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 11
Related Content
BEx Web Interfaces in SAP NetWeaver BI 7.0 - Webinar Presentation
Thread: BI 7 Web Design API - Parameter modification - Exception symbol
Examples of Modules
For more information, visit the Analytics homepage
How to Display Traffic Lights for Exceptions in BI Web Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 12
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.