SAP-HANA
SAP HANA SQL: Learn in 10 Minutes
Most RDBMS database uses SQL as database language, the reason of being popular is – it is...
What is Calculation View?
SAP HANA Calculation view is a powerful information view.
SAP HANA Analytic view measure can be selected from only one fact table. When there is need of More Fact table in information view then calculation view come in the picture. Calculation view supports complex calculation.
The data foundation of the calculation view can include tables, column views, analytic views and calculation views.
We can create Joins, Unions, Aggregation, and Projections on data sources.
Calculation View can contain multiple measures and can be used for multidimensional reporting or no measure which is used in list type reporting.
Characteristic of SAP HANA Calculation View as below –
SAP HANA Calculation View are of two types –
In SAP HANA Analytic view, we can select a measure from one table only.
So when there is a requirement for a view which contains measure from the different table then it cannot achieve by analytic view but by calculation view.
So in this case, we can use two different analytic view for each table and join them in calculation view.
We are going to create a graphical Calculation View "CA_FI_LEDGER" by joining two Analytic View "AN_PURCHASE_ORDER" And "AN_FI_DOCUMENT".
CA_FI_LEDGER will display finance document detail related to a purchase order.
STEP 1) In this step,
A Calculation View Editor will be displayed, in which Scenario Panel display as below –
Detail of Scenario panel is as below –
We have 5 different types of nodes, they are
Note: We can only add one source objects in a Projection node.
STEP 2)
We have added two analytic views, for creating a calculation view.
STEP 3) Click on Join_1 node under aggregation and you can see the detail section is displayed.
Projection_PO. PO_Number = Projection_FI.PO_NO.
STEP 4) In this step,
STEP 5) Now, click on Semantics Node.
Detail screen will be displayed as below. Define attribute and measure type for the column and also, mark key for this output.
STEP 6) Validate and Activate calculation View, from the top bar of the window.
Calculation View will be activated and will display under Modelling Package as below –
Select calculation view and right click ->Data preview
We have added two analytic views and select measure (TAX_AMOUNT, GROSS_AMOUNT) from both analytic view.
Data Preview screen will be displayed as below –
CE Functions also known as Calculation Engine Plan Operator (CE Operators) are alternative to SQL Statements.
CE function is two types –
Data Source Access Function
This function binds a column table or a column view to a table variable.
Below is some data Source Access Function list –
Relational Operator Function
By Using Relational Operator, the user can bypass the SQL processor during the evaluation and communicate with calculation engine directly.
Below is some Relational Operator Function list –
Read the required columns/data.)
and display the queried columns to the output.)
display the queried columns to the output).
filters to restrict the data. It provides column name aliase features also.)
This is same as calculated column in graphical models.)
Below is a list of SQL with CE function with some Example-
Query Name | SQL Query | CE-Build in Function |
---|---|---|
Select Query On Column Table | SELECT C, D From "COLUMN_TABLE". | CE_COLUMN_TABLE("COLUMN_TABLE",[C,D]) |
Select Query On Attribute View | SELECT C, D From "ATTRIBUTE_VIEW" | CE_JOIN_VIEW("ATTRIBUTE_VIEW",[C,D]) |
Select Query on Analytic View | SELECT C, D, SUM(E) From "ANALYTIC_VIEW" Group By C,D | CE_OLAP_VIEW("ANALYTIC_VIEW",[C,D]) |
Select Query on Calculation View | SELECT C, D, SUM(E) From "CALCULATION_VIEW" Group By C,D | CE_CALC_VIEW("CALCULATION_VIEW",[C,D]) |
Where Having | SELECT C, D, SUM(E) From "ANALYTIC_VIEW" Where C = 'value' | Var1= CE_COLUMN_TABLE("COLUMN_TABLE"); CE_PROJECTION(:var1,[C,D],"C" ="value"/ |
Most RDBMS database uses SQL as database language, the reason of being popular is – it is...
What is SAP HANA Information composer? SAP HANA Information composer is a web application that...
SAP HANA Database is Main-Memory centric data management platform. SAP HANA Database runs on SUSE...
$20.20 $9.99 for today 4.6 (120 ratings) Key Highlights of SAP HANA Tutorial PDF 253+ pages eBook...
What is Sap Hana Security? SAP HANA Security is protecting important data from unauthorized access...
SAP HANA Operator can be used for calculation, value comparison or to assign value. SAP HANA...