Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member227713
Discoverer

When creating HANA views, the focus is mostly on creating an optimal data structure. The demands of client tools like Design Studio are often overlooked in the first place. This document describes ways to improve the performance of client tool data access to HANA views.


Improving Member Value Access


When client tools are about to send requests to the HANA view they often need to validate the request parameters.


In Design Studio this happens mostly during script execution, for example with methods setFilter() or getDataAsString(), which pass member values to the HANA view. Before the actual method operation takes place, the member values are validated against the HANA view. The validation might trigger the complete execution of the HANA view. Depending on the complexity of the view this may take a significant amount of time.


Incidentally, by default, columns that are "Local" will validate their members against the underlying HANA view, columns that are "Shared" will validate against their Dimension View/Attribute View.


To avoid the complete execution of the HANA view, one can associate a table with each column of the HANA view that provides the set of valid member values:


In HANA Studio, open the HANA view, select a column in tab “Columns”, click the toolbar button “Assign Semantics”, and select “Assign Value Help View...”. (Hint: This menu entry is disabled if an Aggregation is applied to the column.)



This opens the following dialog box:



Click the value help button of “View/table for value help” and select the table containing the member values (to override the default value of “... (Current View)”. Close this dialog box and repeat this operation with all "Local" columns of type "Attribute" (columns which are not defined as measures) of the HANA view.


Finding the appropriate table containing the valid member values is typically an easy task for the one how knows the semantics and created the view. Typically this is a “master data table”. For example, a view may contain a customer id related to orders. Then the appropriate table would be the one in which all the customers are maintained. In this case the customer id column of the master data table should be chosen.


Improving Variable/Parameter Value Access


The above concept applies not only to member values, but also to values of input parameters (“prompts/variables” in Design Studio terminology, “parameters/variables” in HANA terminology): If no specific metadata are applied then valid parameter values are picked by complete execution of the HANA view. In Design Studio this occurs, for example, when the prompts dialog is executed or methods are executed that modify variable values, such as setVariableValue().


Luckily, the valid parameter values can also be provided by a table to the HANA view. In HANA Studio, open the HANA view, select a parameter in tab “Parameters/Variables”, double-click in the selected row the cell in column “Value Help Column”.


This opens the following dialog box:



Enter the appropriate table in “View/Table for value help” to override the default value of “... (Current View)”, then enter the appropriate value in “Attribute”.


Finding the appropriate table containing the valid parameter values follows the same principles as described above for the member values.

2 Comments