Within the time frame of 2022 QRC2, several new calculation view features have been released in SAP HANA Cloud that can be used with SAP Business Application Studio. Some of these features are highlighted below.
You can find examples that illustrate the individual features here. An overview of features of other releases can be found here.
Calculation View Snapshots
In tab “Snapshots” you can define individual queries for calculation views. Based on these queries procedures are generated that create, drop and insert into snapshot tables:
This provides a flexible means to store results as they are at a certain point in time. The life-cycle of these procedures is controlled by the calculation view.
In addition, a calculation view can be generated to easily toggle between the online and snapshot data:
With snapshots you have now an easy and flexible means to serve queries that do not need online data and by this reduce resource consumption. See the modeling guide and performance guide for developers for more information.
Comments in Expressions
Use comments in expressions to better document the intention behind expressions. This will help during later refactoring and improve collaborative working.
Comments can be entered using one of the two styles:
/* comment */
-- comment
Mapping of Session Variables
Session variables can now be mapped into input parameters. This helps to re-use existing calculation views with input parameters in scenarios in which session variables should be used.
Example
Example Query
SELECT
"SalesOrderID",
"temperature",
SUM("year") AS "year",
SUM("amount") AS "amount"
FROM "mapSessionVariable"
(placeholder."$$IP_MinimumID$$"=>'1')
GROUP BY
"SalesOrderID",
"temperature"
Results
a) Setting session variable to “old” data
SET 'SV_temperature'='old';
b) Setting session variable to “new” data:
SET 'SV_temperature'='new'
Median Aggregation