Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
pranav_kandpal
Participant

Introduction

This document covers the scenario of displaying colors in a Web Template. Complex Bex queries with a color format can be created for a particular business requirement e.g. to report exception scenarios but when these queries are embedded in a Web Template, the color coding corresponding to these exceptions does not gets displayed. To achieve the above functionality this document covers the necessary steps by step approach to be applied in to the Web Template so that the desired color coding could be visible in a Web Template report.

Stepwise Approach

1. Designing a Query

To start with a Bex query will be designed which will be embedded into the Web Template. A simple scenario of a classic IP Solution will be considered for the purpose.

A report needs to be created to provide the details opening / closing of a new order for a particular project. This report will be used by an administrator to review current status of undergoing projects (Open / closed / In progress ) along with their timestamps and further details.

A custom Query to be created based on your requirement for the report to be displayed.

This query will be used by the Analysis Web Item of the Web Application Designer. Query design to be used in this whitepaper is as below.

In this example Key Figure “Status” has been taken in the Column of the query which holds the status values of an order. An order may have below given status in its lifecycle and these statuses need to be depicted with different colors in WAD display .

After  the Basic design of the query is completed, exceptions will be embedeed in to the query. Exceptions will be used to display the output of the Query as a color code based on the different “Alert levels”. These exceptions will be created for each Key Figure STATUS value for the Alert level.

Overview of the list of different Exception Alert levels and values.

Overview of all the exceptions created.

         

Setting to be made in the Display Tab are as below,

Now once the all the required exceptions are created we can make further changes to the query as desired.

For example , If we want to filter the data based on the Key Figure on the value which has been input by the user , then we can make a new Condition which can be restricted to the User entry Variable.

With the above steps Query designing part is complete . When this query  will be executed the output of the query will be displayed based on the Exceptions Color Code but as per the problem statement of this document when this query will be embedded in to the WAD Web item , the color code will not be dispalyed in the WAD output.

Next step is to the make the appropiate enhancement in the WAD to achieve the color coding.

2. Designing a WAD

A WAD will be created in which we will embed the Query as designed in the previous section.

This WAD can be designed in the any desired format we want to display the output.

To display the color code now we need to make few changes to the Parameters of the Analysis Web Item.

We have to add the Analysis web Item module for color code display as mentioned in the below screenshot marked in the red rectangle.These modules contains the parameters which can be controlled by the user and enhance the functionality.

                     Analysis Web Item

For each color code and status we need to implement a separate module with its corresponding exception alert level and the color to be displayed .In the WAD color code display we can separately handle the color to display for each alert level.

As an example we will consider the display of color code of the “Initialized” status of an order

Below given is the step by step approach to enhance the functionality of the Analysis Item through the formatting module [com.sap.ip.bi.rig.format]
which is required to display the color code of the “Initialized” status.

1. Specify the module in the Modification parameter of the Analysis Web item.

    1. Select ‘Single Module “in the Web Item Parameters of the Analysis Web item.
    2. Enter the name of the module as [com.sap.ip.bi.rig.format].
    3. Give any alias name which is according to your wish.
    4. Set Active as ‘ON’ if you want to activate the Module. By default it is set to OFF.

       

2. Determine the parameters for the selected module to be used.

    1. The first parameter is the cell alert level and the second parameter is the color.
    2. Enter the name of the parameters as in below figure.
    3. For each alert level we have a different name for the first parameter.

  

Each parameter for the Alert level has its own vales which can be set as in the below screenshot.

a. For the parameter Alert level set the Value as Boolean and turns it ON.

b.For the parameter Color, set the desired color by setting the Value as STRING and entering either the color code or the color name. For e.g. we can also set the string value as #FF700 and also as BLUE /RED etc. It depends on your requirement to display the desired color; if the color is not one of basic colors you can use the COLOR CODE as provided by SAP.

Similarly for each exception alert level other corresponding modules can be implemented by providing the detailed list of parameter name for the alert level and the color code to be displayed. By following the above procedure for each exception the respective Order Status Legend is created.

                           Status Legend

For each specific alert level we have a specific parameter to be used which will be required to display the color code for the corresponding Order Status.

Output of the WAD

Once above mentioned steps are completed we are ready to display the color code output of the WAD.

  As in the screenshots above we can see the various color codes in the Status column.

Labels in this area