Challenge

SAP Analytics Cloud is a powerful frontend especially when working with SAP BW live connection. Reporting with SAP BW Live Connection  especially in context of BEx Variables can be enhancement to optimize user experience.

In our example we want sort the result of the variable help in SAP Analytics Cloud Story Filter linked to a BEx Variable to make it easier for the end user to select the most current member if time dimension 0FISCPER.

Standard behavior of using an BEx Variables in SAC with BW Live Connection is to offer a value help where values are sorted ascending. In our case we had a look at a BEx Variable named “ZSRC_FISCPER” based on Fiscal Period. When sorting periodic values will start at the very beginning. Assuming you start at 1990 will lead to more than 360 entries in 2020. Our objective is to offer the most current member at the top and reduce clicks to select one of the current data. A simple sort of the value help members descending by key ascending will help user to reduce clicks. 

We do not find any way to change that behavior, neither in SAP Analytics Cloud nor in SAP BW BEx Backend.

Objective

In our example we have 3 entries sorted by key ascending.

Fig. 1

Our objective is now to change this behavior and get the most current period at the top. The result should look like it is shown in that example.

Fig. 2

Solution

In BEx Query an input ready variable was added to InfoObject 0FISCPER named ZSRC_FISCPER.

Fig. 3

The SAP BEx Query is used in a model and then in a story that uses the BEx variable as story filter. A first look at the value help will come up with the following member list sorted ascending.

Fig. 4

Having a deeper look at the backend calls to the GetRespond of the value help of the variable with Google Developing Tools by pressing F12.

Fig. 5

We will see that the request for the value help member list of the variable is sorted by MemberKey without direction, that is by default ascending.

Fig. 6

We capture the SAP Analytics Cloud request in the backend in the class CL_BICS_INA_PROC_DATA_F4 method _EXECUTE_VALUE_HELP. By implementing an enhancement point at the end of the method _EXECUTE_VALUE_HELP of class CL_BICS_INA_PROC_DATA_F4 we are able to access table <L_T_MEMBER> that carries values for the value help in the response.

In our example the content of the table will look like this:

Fig. 7

With the help of our enhancement implementation named ZPA_ENH_INA_VALUE_F4HELP we change the content of the <l_t_member> and sort the column name ascending with the help of the small code snippet.

Fig. 8

Fig. 9

As a result, the values in value help is shown according to the content of the table content.

Fig. 10

Conclusion

It would be very helpful to have further possibilities to parametrize value help in SAP Analytics Cloud especially with SAP BW live Connection. This example shows that there are possible improvements. Be aware that the solution is an enhancement of the standard implementation and can change with upgrades, notes on SAP Analytics Cloud and/or SAP BW Backend side.