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. 2010 SAP AG 1
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 2010 SAP AG 2
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. 2010 SAP AG 3
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. 2010 SAP AG 4
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 Critical 1 Bad 2 Green Yellow 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. 2010 SAP AG 5
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 Yellow Red bwmimerep:///sap/bw/mime/bex/icons/s_s_ledg.gif bwmimerep:///sap/bw/mime/bex/icons/s_s_ledy.gif bwmimerep:///sap/bw/mime/bex/icons/s_s_ledr.gif 2010 SAP AG 6
(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 2010 SAP AG 7
ALERT_8 - Red Select OK after defining all the required parameters (Green, Yellow and Red). 2010 SAP AG 8
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. 2010 SAP AG 9
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> 2010 SAP AG 10
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 2010 SAP AG 11
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. 2010 SAP AG 12