We saw how to do Extraction of ECC tables to SAP-HANA using BODS.in First part –
Now in this part we will create Calculation view on same Extracted ECC tables in to HANA and also consume this calculation view in SAP BW powered by HANA.
Step1> Log into SAP HANA .
Go to Catalog–>Expand–>Expand the Schema (which we have given while creating Target Table as a owner name ) –> Expand Schema–> Expand Table
Observe the table– VBAKVBAP
Check the Definition and Content of Table by Right click on Table.
Step 2> Now we will create Calculation view based upon the Table—“VBAKANDVBAP” with Data category Cube.
Select your Package–>Right click–>New–>Calculation view
Here we will Drag and drop the VBAKANDVBAP table to projection or by clicking on plus icon.
Select the desired fields by clicking on Circle icon right before the field name from Details Output
Step 3> Create calculated column.
Under Column folder I have NETWR field “Net value of the Order item in document currency”
Business requirement is to add one more filed is called VAT.
Formula for VAT is “NETWR”*0.5/100
Click on Calculated Column Folder–>Right click–>New
Click on Validate Syntax for any Error.
Observe the VAT field under calculated column.
Save and Activate
See the Raw Data and Observe the Newly added field “VAT”
Step 3> Apply Rank node.
Business Scenario — is to generate the one report which will show TOP 4 sales document date wise.I have made some changes in calculation view.
Do below mentioned things as it is , like below pic–
Remove “VBAKANDVBAP” table from projection. Drag and Drop “Rank” node to the modeling panel.
Now add “VBAKANDVBAP” table to RANK node.
Add Rank node to Projection node.
Now will define RANK but first we need to know the functionality of RANK.
Threshold—this value is used by the system to filter the result data set after it calculates the rank.
Order By—this column is used to perform Order By after the system performs partition.
Partition—this column is used to partition the source data set based on the columns we define.
When you Drag and drop the RANK node to the right panel. check the RANK node properties.
Give the values like mentioned in below–
Sort Direction– Descending (Top N)
Order By- VBELN
NOTE—Make sure at each node, we have selected the fields which you want to see in report output.
Go to Aggregation level, Select the measures (NETWR,WAERK and VAT) –>Right click–>Add as a Aggregated Column.
Go to Semantic–> Under Column Tab.
Mark All measures fields as Measure and rest of the fields as a Attribute.
Save and Validate.
Observe the Raw data based upon your Rank fields.
we have successfully created Information view in HANA DB.
So far we have Extracted ECC tables into HANA DB and there we have created calculation views and performed some operations, now we will consume this calculation view in to SAP BW by using Virtual provider.
Step 1> Log in to SAP BW.
Go to System menu–>Status. My Database System is HDB.
Click on component (Magnifying glass symbol)—
Now we will create Transient Provider to consume HANA model (calculation view) in SAP BW powered by HANA
In Transient Provider Analytical/ Calculation views allowed.
Creation of Bex allowed.
Multi provider allowed— There is a new tab has been added in Multiprovider to add Transient data.
Composite Provider is allowed.
Master data is allowed but only for Display Attribute.
Step2 > Create Infoarea
Step 3> T-CODE- rsdd_hm_publish
Enter your same package name under which you have designed your calculation views.
Click on create, a new window will appear. Enter the InfoArea name.
Observe Characteristics Tab, give the Ref. InfoObject name if any
Observe Key figures Tab
Here Characteristics are what we had defined as Attribute in HANA and Key figures are measures.
Here name of Infoprovider is @3CALV_VBAKANDVBAP
Transient Provider names start with @3 followed by information views name.
Transient Provider are Virtual provider.
Go To SE–>@3CALV_VBAKANDVBAP–>Display
No Table Exist
We can create Transient Provider directly in Production system, but with the help of RSLTIP we can create Transport request in Dev.
Go to –> SE11–> RSLTIP–> Display–>Content
We can create Transport request form Table Entry menu and move the object.
Now you can create the Query on Infoprovider- @3CALV_VBAKANDVBAP and observe the report.