Create a Calculation View in SAP HANA

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 New View Dialogue Box
SAP HANA Create a New View Dialogue Box

SAP HANA Data Modeling

SAP HANA Data Modeling
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.

SAP HANA Calculation View Star Join
SAP HANA Calculation View Star Join

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.
Create Script View
SAP HANA Joing Script Procedure
SAP HANA Choose Columns Dialouge Box

Raw Data Results of Scirpt View

SAP HANA Raw Data View
SAP HANA Raw Data View

Leave a Reply

No apps configured. Please contact your administrator.

    Information Design Tool – Create a data foundation using SAP HANA tables

    Once a relational connection has been created in SAP HANA, the next step is to create a data foundation for the universe. When connecting SAP HANA, you can build your data foundation by selecting the appropriate tables and creating joins between them, or you can build your data foundation directly on a pre-existing analytics or calculation view.

    Information Design Tool – Create Relational Connection to SAP HANA

    When setting up a Universe that connects to SAP HANA, you must first create a relational connection to the HANA database using JDBC or ODBC drivers. Once the connection is …

    Total Page Visits: 723 - Today Page Visits: 1