You can access my previous documents in the below links:-
HANA Artifacts Part1 http://wiki.scn.sap.com/wiki/display/Snippets/HANA+Artifacts+Part1
HANA Artifacts Part1 Continued http://wiki.scn.sap.com/wiki/display/Snippets/HANA+Artifacts+Part1
HANA Artifacts Part2 http://wiki.scn.sap.com/wiki/display/ABAPch/HANA+Artifacts+Part2
HANA Artifacts Part3 http://scn.sap.com/docs/DOC-48851
We will see HANA Specific views in this part of HANA Artifacts……..
Apart from SQL Views where we can do basic joins, in SAP HANA we can create 03 HANA Specific views types which have powerful functionalities
like calculating aggregates, declaring variables, calculated columns, restricted columns etc.:-
We can achieve different functionality from these HANA specific views:
Are used for business analysis and can be used for join operations on different tables. These views can be reused inside other views (Analytic &
Calculation). Can have calculated columns where formulas can be inserted, simple columns and Hierarchies (for drill in capabilities). Runs on
Are multidimensional views which run on OLAP/Analytic engine. We can use Attribute views inside Analytic views.
It can be created as graphical view or scripted views, can join several fact tables, attribute views and analytic views.
We create HANA Specific views in Modeler prospective, for adding Modeler perspective
In Output window under ‘Columns’ we can see all the fields which we need to be displayed in out Attribute view. Rt. Click to add the fields……..
We can create Calculated Columns here. Under ‘Property’ window we can set the properties of the fields.
Note: One key attribute we have to set from our fields in ‘Attribute View, else it will give error:
Now let’s move to the next level of our development, we need to calculate the new discount based on the YEAR:-
If product YEAR (i.e. 2013) >3 from then “DISCOUNT” should be 3 times.
If product YEAR is current year (i.e. 2013) then no “DISCOUNT”.
Else for all other years, “DISCOUNT” should be 2 times.
For achieving this we need to add 02 Columns in our current table i.e.2 calculated columns.
So, we will add 02 calculated columns, ‘YEAR’ and ‘DISCOUNT_NEW’.
We will take last 04 characters from field ‘DATE’ and display it in new field, i.e. ‘YEAR’.
Let’s create another Calculation column for calculating Year (last 04 characters) i.e. ‘YEAR’.
Many thanks to Thomas Jung for the wonderful initiative and contribution to HANA tutorials… Must watch his video: https://open.sap.com/videos/128?module_item_id=296
In next document we will see Analytic Views…. http://scn.sap.com/community/developer-center/hana/blog/2013/11/13/hana-artifacts-part42-analytic-views