This article explains how to use the Gadget calculation Data Provider.
2. What is it?
This DP is available with ST-OST 200 SP03 and upper release, The gadget calculation is used to perform operations on a Serie or elements of a table using the SLA property of the query and it can also perform operations on two or more gadgets using the well known arithmetic operators (+, - ,*, / ).
In a multi Serie chart the DP applies the SLA to each Serie then it sum them , for example if you have two gadgets with one of those using a multi-series line chart, say, three series, the equation form will be as follow : [SLA(serie1)+SLA(serie2)+SLA(serie3)](Gadget1) “operator(+,-,x, /)” [SLA(serie)](gadget2),
or you can simply display the Gdget1 without using the operators.
The following figure illustrate the calculation pad you’ll use to compose your equation :
3-the function that identify the gadget by its ID and has other functionality (see section 4).
4-if you want to add numerical operators you can use this function.
5-delete the selected element (you must click on the element you want to delete then use this function).
6-clear the equation.
If you want to change the operator you have to click on it and choose another from the list.
3. Supported renderers
4. Use case
It's about an organization that use complex configurations in the OCC Dashboard to display compliancy for all their systems
They group same Base Lines (SAP_ALL, profile parameters etc.) in different regions / Business Unit/ Technology (Java, ABAP, HANA) And They want to report the number and rate of Compliant items, Non-Compliant and Not-found
For this OCC Dashboard Gadgets are configured using DP_SECURITY / SLR_TABLE_RENDERER, the time range is : Last 7 days / day . SLA is used in the properties and set on "Last" to make sure to get always the most recent data, and DYNAMIC_TABLE renderer is used for the Jump-in to get details about the items.
masked queries should not be considered in the calculation.
this is not an SLR_TABLE_RENDERER wiki but i want to describe how a table is created with this renderer :
this is done by editing the name of the query, the form of the name should be as follows : line / row.
in our example we have two lines and two colums ---> four elements, then four queries named as follows :
SAP_ALL / P31
SAP_ALL / P32
open clients / P31
open clients / P32
so this is the first gadget that represent the non-compliant elements according to the last update :
this is the second gadget with the number of compliant elements :
and finally the one that contain the not-found elements :
so now you must create a new gadget using the SLR_TABLE_RENDERER then add a query, you name it SUM/ABAP_non_compliant_items and finally you choose the DP_GADGET_CALCULATION from the drop-down list under the query settings' scope, after this step you should have the calculation pad of the section 2, you click on the GSUM button and you add the id of the Non-compliant-items' gadget then you click on add.
" the GSUM is a function designed to contain the values returned when querying a database using the SLA property and in case of multiple queries the GSUM sum the returned values of the queries, thus in case of single query the value presented by the GSUM function is the (Average, Maximum, Minimum, Last, Sum) of a bunch of database’s elements, in case of multiple queries the result is the sum of the returned value of each single query.
The GSUM function can also be used as an operand in an equation composed by the user.
the GSUM function take the id of the Gadget as input "
now you create another query always with the DP_GADGET_CALCULATION, you name it SUM/ABAP_compliant_items and like for the previous query you click on GSUM but this time you enter the id of the compliant_items' gadget.
the third query is for the not-found-item's gadget so you name it SUM/ABAP_not_found_items and in the GSUM function you add the id of the not-found-item's gadget.
each one of these three queries sum the elements of the corresponding Gadget, and this is done with the GSUM function which automatically sum the returned value of a gadget's different queries like explained before.
now we'll create three other queries named respectively
*Rating (%) / ABAP_non_compliant_items
*Rating (%) / ABAP_compliant_items
*Rating (%) / ABAP_not_found_items
each of which use the DP_GADGET_CALCULATION, and for each of which the user should compose the equation to determine the rate of our three compliance KPIs(gadgets).
your queries' list should now look like this :
the first query (which is the fourth in the query list ) this is the equation to determine the Non_compliant_items' rate: GSUM(id_Non_compliant_items) / ( GSUM(id_Non_compliant_items)+ GSUM(id_compliant_items)+ GSUM(id_Not_fount_items) )
the second query : GSUM(id_compliant_items) / ( GSUM(id_Non_compliant_items)+ GSUM(id_compliant_items)+ GSUM(id_Not_fount_items) )
the third query GSUM(id_Not_found_items) / ( GSUM(id_Non_compliant_items)+ GSUM(id_compliant_items)+ GSUM(id_Not_fount_items) )
for example :
Finally we should have this useful table :
5. Another non-specific use-case using the LINE_CHART renderer
In this example we will use the SLA (average)
Gadget 1 :
Query 0 : 1700/18 =94.44
Query 1 : 112.14/24=4.67
Query 2 : 1467,23/18=81.51
Query 3 : 151.11/24=6.29
GSUM(5456)= Query0+ Query1+Query2+Query3= 186.92
you can get the measurements by clicking on the knot or using the table view :
Query 0 : 132/24 =5.5
Query 1 : 531.24/24=22.135
Query 2 : 55.15/24=2.297
Query 3 : 4743/18=263.5
Hence GSUM(5457)=Query0+ Query1+Query2+Query3=293.432917
Gadget_3 (which contains the DP_GADGET_CALCULATION) :
GSUM(5456)+GSUM(5457) = 293.43+186.92 = 480.35.
No validation needed from the back-end it’s a front-end data provider may be all you’ll need is a calculator.