Calculation views are composite views used on top of analytical and attribute views. It can perform complex calculations not possible with other view. Calculation views can be defined as either Graphical Views or Scripted Views depending on how they are created.
- Graphical Views can be modeled using the graphical modeling features of the SAP HANA Modeler.
- Scripted Views are created as sequences of SQL statements
SAP HANA Data Modeling
SAP HANA Calculation View with Star Join:
You need to convert your column based tables to Dim Calculation Views. You can’t use column tables, attributes/analytical, and other Calculation views with Star Join. You can ONLY select “Dimension Calculation View” in Star Join Scenario in STAR JOIN Calculation View.
Scripted Calculation view based on SALES Order
- 1. Log into SAP HANA Studio with your credentials
- 2. Go into package and select create new -> calculation view
- 3. First we need to create the script which should start with “BEGIN” and complete with “END”
- 4. Eg. Using a Sales Order Header Table – “VBAK” and Sales Order Item Table “VBAP”.
- 5. Next we define the Column Tables as CE_COLUMN_TABLE
- 6. We join them using CE_JOIN
- 7. Then we write the output using VAR_OUT = CE_PROJECTION
- 8. After writing the script we choose which columns we want from the tables
- 9. Lastly we validate the script and then we can view the Raw Data.