Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
RDP160
Hands-on Exercises
SAP TechEd 2013
INITIAL SETUP
During the exercises, you will work on a SAP HANA system with the following system properties:
Host name:
coe-he-084.wdf.sap.corp
Instance number:
10
SAP System ID (SID):
M31
Database user name:
RDP160_# (# = your assigned student ID, maybe 1 or 2 digits)
Password:
Welcome13
Database Schema
RDP160
Student exercise package RDP160.sessionX.# (X = your assigned session number, # = student ID)
Solution package
RDP160.solution
As preparatory steps, make sure a connection to the backend SAP HANA database system is defined with your
assigned user (RDP160_#).
Explanation
1. Start the SAP HANA Studio (SP6 Revision 61)
from the Windows-Start Menu.
Screenshot
Explanation
2. Open the Modeler Perspective from the SAP
HANA Studio start screen
Screenshot
Explanation
Then open
General -> Security
-> Secure Storage
Screenshot
Explanation
And click OK.
Screenshot
Explanation
Screenshot
Host Name:
Instance Number: 10
coe-he-084.wdf.sap.corp
Password:
Welcome13
Explanation
6. Explore the SAP HANA Database Catalog and
Repository Content structure for the Workshop
The Database Catalog, i.e. the SAP HANA
database schema with the tables for this
workshop is the schema RDP160.
To explore the schema:
Expand the Catalog folder > RDP160 >
Tables
Screenshot
Name: S1EX1_DIM_CUSTOMER.
Click Finish
Screenshot
10
BusinessPartner
Addresses
BusinesPartnerContacts
Screenshot
11
Screenshot
Operation: Equal
Value: 01
12
Screenshot
to
).
13
Re-open the SAP HANA SystemView from its collapsed state on the
left or
use the keyboard shortcut Cntrl+M to
resize the Attribute View Editor back to its
previous non-maximized size.
Screenshot
14
Name: S1EX2_FACT_SALESORDERS.
Click Finish
Screenshot
15
Explanation
3. Select the fact data table to be used in the
Analytic View
From the catalog tree in the SAP HANA
Systems View Drag and Drop the following
tables from the schema RDP160 to the Data
Foundation in the scenario area of the editor:
SALESORDER
Screenshot
16
Explanation
6. Create the join between fact data
of the Data Foundation and the
Attribute Data in the Logical JoinNode of the scenario area
Screenshot
Join Defintion
17
Explanation
Screenshot
) or
Measure (
) will be assigned as well as the
default aggregation-function for measure
columns.
Columns deriving from the Data Foundation are
displayed on the local-tab, inherited columns
from the contributing Attribute Views are
displayed on the shared-tab.
18
Explanation
11. Preview the Analytic View.
Re-open the SAP HANA SystemView from its collapsed state on the
left or
use the keyboard shortcut Cntrl+M to
resize the Analytic View Editor back to its
previous non-maximized size.
Screenshot
19
Exercise 1.3 Exploring the Analytical Views with SAP Lumira (Optional)
For preview purpose, you can optionally alternatively use SAP Lumira to explore SAP HANA Analytic and Calculation
Views. SAP Lumira is a self-service solution that makes it easy to combine, manipulate, transform and visualize
business data and analysis.
Explanation
1. Start the SAP Lumira from the Windows-Start
Menu.
Screenshot
20
Explanation
Screenshot
Host Name:
Instance Number: 10
coe-he-084.wdf.sap.corp
Password:
Welcome13
21
Explanation
Screenshot
Select S1EX2_FACT_SALESORDERS
Note, if you choose to create a new visualization with different data, you have to go back to the step create
New Document, specify Data Source Type and connection details before you can select a different HANA View to
explore.
22
Exercise 1.4 Enhancing Attribute- and Analytic View with calculated columns
This exercise guides students how to create Attribute- and Analytic View based on existing views and how to created
calculated columns for both.
For the Customer Attribute View, we want to create a continent calculated attribute column and for the
SalesOrder Analytic View, we want to create a calculated measure for paid amounts.
Explanation
1. Start and Open the Editor to create an
Attribute View
Name: S1EX4_DIM_CUSTOMER.
Select
Copy from and Browse to
navigate the content tree to select the
Attribute View from exercise 1.1 as the
starting point for the new Attribute View,
select S1EX1_DIM_CUSTOMER
Click Finish
Screenshot
23
Explanation
Screenshot
Then select OK
).
24
Explanation
5. Validate and Activate the Attribute View.
Screenshot
25
Explanation
7. Enter the name of the Analytic View:
Name: S1EX4_ANV_SALESORDERS.
Select
Copy from and Browse to
navigate the content tree to select the
Analytic View from exercise 1.2 as the
starting point for the new Analytic View,
select S1EX2_FACT_SALESORDERS
Click Finish
Right-click on S1EX1_DIM_CUSTOMER in
the Logical Join-Node, then from the
context menu choose Remove
and
confirm deletion when prompted.
Type S1EX4
and then select the previously created
AttributeView, which is stored in your
personally assigned content package:
S1EX4_DIM_CUSTOMER.
Screenshot
26
Explanation
9. Recreate the join relationship between the
existing Attribute View and the Analytic View
Data Foundation (Refer to Ex1.2 step 6).
Screenshot
27
Explanation
Screenshot
).
28
Explanation
13. Preview the Analytic View.
Screenshot
29
Name: S2EX1_DIM_PRODUCT.
Click Finish
Screenshot
30
Explanation
3. Select the tables to use in the Attribute View
Drag and Drop the following tables from the
schema RDP160 into the Data Foundationnode in the scenario area of the editor:
Products
texts
4. Create text join between the Product and Texttable to lookup ProductName.
Screenshot
31
Explanation
5. Select columns from the Product table to be
used in the Attribute View.
Screenshot
32
Explanation
Screenshot
to
Level 1: ProductCategory
Level 2: ProductId
Click OK to finish.
33
Explanation
7. Review the Attribute View output structures.
Screenshot
34
Explanation
9. Preview the Attribute View.
Screenshot
35
Exercise 2.2 Building Analytic Views with Attribute Views from multiple dimensions
This exercise guides students how to create an enhanced Attribute View, and joining Header-/Item-tables in the Data
Foundation of the Analytic View and joining with multiple Attribute Views in the Logical Join.
You will join the SalesOrder(header)- and SalesOrderItem-tables to link the SalesOrder data also to the Product
Attribute Views. Further you will additionally join with a prepared Time-Dimension Attribute View, to be able to
analyze the SalesOrder data by the Customer-, Product- and Time-Dimension.
Explanation
1. Now, start and open the editor to create an
Analytic View with a calculated column.
Name: S2EX2_ANV_SALESORDERS.
Select
Copy from and Browse to
navigate the content tree to select the
Analytic View from exercise 1.4 as the
starting point for the new Analytic View,
select S1EX4_ANV_SALESORDERS
Click Finish
Screenshot
36
Explanation
3. Remodel the Data Foundation of the Analytic
View to include the SalesOrderItem table.
Drag and Drop the following tables from the
schema RDP160 to the Data Foundation in the
scenario area of the editor:
SalesOrderItem
Screenshot
37
Explanation
4. Remodel the Logical Join of the Analytic View
to include the Time- and the Product Attribute
Views.
Add the additional Attribute Views:
In the content tree of the SAP HANA Systems
View Drag and Drop the following Attribute
Views to the Logical Join-Node in the
scenario area of the editor:
from your personal assigned content
package the S2EX1_DIM_PRODUCT
Attribute View
From the content package tree
\RDP160\solution\shared\ the DIM_TIME
Attribute View
Screenshot
38
Explanation
Screenshot
Rename
QuantityUnit to OrderQuantityUnit
Rename
Quantity
to OrderQuantity
) at the right
39
Explanation
7. Validate and Activate the Analytic View.
Screenshot
40
Explanation
9. Preview in SAP Lumira to explore HANA
hierarchies (Product Hierarchies)
OPTIONAL STEP!
In SAP Lumira follow the steps described in
chapter 1.3 to open a HANA View, in short:
create New Document
specify Data Source Type and connection
details
then select the view
before you can select
S2EX2_ANV_SALESORDERS
Explore the Analytic View
Screenshot
41
Name: S2EX3_ANV_SALESORDERS.
Select
Copy from and Browse to
navigate the content tree to select the
Analytic View from exercise 2.2 as the
starting point for the new Analytic View,
select S2EX2_ANV_SALESORDERS
Click Finish
Screenshot
42
Explanation
3. Create a Variable for Country and Date in the
Semantic Node.
Select > OK
Select > OK
Screenshot
43
Explanation
4. Validate and Activate the Analytic View.
Screenshot
44
Explanation
5. Preview the Analytic View.
Screenshot
45
Name: S3EX1_ANV_SALESORDERS.
Select
Copy from and Browse to select
S2EX2_ANV_SALESORDERS
Click Finish
Screenshot
46
Explanation
3. Create Input Parameter for Discount
Percentage and Product Category in the
Semantic Node.
Select > OK
Select > OK
Screenshot
47
Explanation
4. Create a calculated column to enhance the
Analytic View referencing the Input Parameter.
Screenshot
48
Explanation
6. Validate and Activate the Analytic View.
Screenshot
49
Exercise 3.2 Using HANA Unit Conversion with a Calculated Measures (Optional)
This exercise guides students how to make use of Unit Conversion to create a ShippingVolume calculated
measures, which will again make use of an Input Parameter prompt, to select the target VolumeUnit used in the
calculation.
Explanation
Screenshot
Name: S3EX2_ANV_SALESORDERS.
Select
Copy from and Browse to
navigate the content tree to select the
Analytic View from exercise 2.2 as the
starting point for the new Analytic View,
select S2EX2_ANV_SALESORDERS
Click Finish
RDP160_SYS
50
Explanation
Screenshot
VOLUME_UNIT
Target Unit for volume
conversion
Select > OK
L
Liters
51
Explanation
Screenshot
001
Set to NULL
52
Explanation
6. Review the overall output structure.
Screenshot
53
Explanation
8. Preview the Analytic View.
Screenshot
54
Screenshot
Name: S3EX3_ANV_SALESORDERS.
Select
Copy from and Browse to
navigate the content tree to select the
Analytic View from exercise 2.2 as the
starting point for the new Analytic View,
select S2EX2_ANV_SALESORDERS
Click Finish
RDP160_SYS
55
Explanation
4.
Set the column type in the column listpane of the sematic details area
Select the drop-down list of the type column
for that:
Screenshot
56
Explanation
6. Change the amount column from a standard
measure to Amount with Currencymeasure column.
Select
Enable for conversion
Target Currency: Value Help Pop-up
Type:
Fixed
Select Currency: USD
Screenshot
57
Explanation
Screenshot
Set to NULL
58
Explanation
8. Preview the Analytic View.
Screenshot
59
Exercise 4.1 Use Temporal Joins in Analytic Views for time-dependent Attribute Mapping (Optional)
The customer status, is a time-dependent (slowly changing dimension) value, changing every quarter depending on
the previous quarters sales turnovers. In this exercise you will use temporal joins in Analytic Views to join the
SalesOrder facts time-dependently to a new Customer Status Attribute View.
Explanation
1. Again, start and open the editor to create an
Analytic View with a calculated column.
Name: S4EX1_DIM_CUSTOMER_STATUS.
Select
Copy from and Browse to select
S1EX4_DIM_CUSTOMER
Click Finish
Screenshot
60
Explanation
3. Remodel the Data Foundation of the Attribute
View to include the BusinessPartnerStatus
table.
Screenshot
61
Explanation
4. Validate and Activate the Attribute View.
Name: S4EX1_ANV_SALESORDERS.
Click Finish
Screenshot
62
Explanation
7. Define the DataFoundation of the Analytic
View.
Add tables to the Data Foundation
Screenshot
63
Explanation
8. Define the Logical Join of the Analytic View to
with the new DIM_CUSTOMER_Status and the
Dim_Time Attribute Views.
Screenshot
64
Explanation
9. Validate and Activate the Analytic View.
Screenshot
65
Exercise 4.2 Restrict access to Analytic Views with Dynamic Modeled Analytic Privileges (optional)
This exercise guides students on how to make use of dynamic analytic privileges to dynamically restrict and filter
data, based on the end-users identity.
In this scenario employees from the sales department, should be restricted to
access only their personal, or their sales team and channels sales figures.
A dynamic Analytic privilege ORGEMPLOYEE_RLS, referencing a Stored Procedures
ORGEMPLOYEE-SECFILTER and an Attribute View ORGSECURITY, which are all
provided in the content package tree \RDP160\solution\shared.
The following shows the analytic privilege definition and the stored procedure:
Now follow the exercise description to make use of the prepared ORGSECURITY Attribute View
Explanation
1. Again, start and open the editor to create an
Analytic View with a calculated column.
Screenshot
66
Explanation
2. Enter the name of the new Analytic View:
Name: S4EX2_ANV_SALESORDERS.
Select
Copy from and Browse to
navigate the content tree to select the
Analytic View from exercise 2.2 as the
starting point for the new Analytic View,
select S2EX2_ANV_SALESORDERS
Click Finish
Screenshot
67
Explanation
10. Remodel the Logical Join of the Analytic View
to include a prepared Organization Attribute
Views, used to filter data dynamically per
employee via Analytic privileges.
Add the additional Attribute View:
In the content tree of the SAP HANA Systems
View Drag and Drop the following Attribute
Views to the Logical Join-Node in the
scenario area of the editor:
From the content package tree
\RDP160\solution\shared\ the OrgSecurityAttribute View
Screenshot
68
Explanation
10. Validate and Activate the Analytic View.
Screenshot
69
Explanation
11. Open the restricted Analytic View with an
employee userid
Screenshot
70
2. Give it a name
Screenshot
71
Explanation
Screenshot
or
72
Explanation
Screenshot
or
right-click on Calculated
Columns and select New
Counter
or
73
Explanation
7. Create two counters
Screenshot
74
Explanation
7. Map the Input Parameters
Now that you are done with the
counters. You want to remove the
warning we have seen before. This
warning is self-explanatory, input
parameters from the analytical view
are not mapped.
Screenshot
75
Explanation
8. Column types
Screenshot
76
Explanation
Screenshot
2) Remove the
countDistinctProducts and add
CountDistinctSalesOrders
We notice that DE and US are
the places where we are getting
most of our orders.
2)
77
Explanation
1. Create a new calculation View
2. Give it a name
Screenshot
78
Explanation
3. Union Node
Screenshot
79
Explanation
5. Add the objects
Screenshot
80
Explanation
6. Mapping in union node
Screenshot
81
Explanation
8. We will now map the plan and
actuals net amount measures.
Start with the NetAmount from the
Analytical View and drag and
drop it manually into our targets.
Do the same thing for the
NetAmount of the Plan table. The
name will become NetAmount_1
9. Link to Aggregation node
You can now link your UNION node
with the AGGREGATION node.
Screenshot
82
Explanation
Screenshot
) to
Then rename
NetAmount to ActualNetAmount
and
NetAmount_1 to PlanNetAmount
9. Save and Activate
You can now save and activate and
check your logs that everything is ok.
10. Data Preview
Finally click on data preview
Finished!! Congratulations!!
Thank you for participating in this SAP TechEd Virtual Hands-On Workshop!
Please, take a few minutes to answer a couple of feedback questions concerning your session.
Find a shortcut to the survey on the desktop of your virtual laptop image or visit
https://www.sapsurvey.com/cgi-bin/qwebcorporate.dll?idx=FSQCZ7.
83
APPENDIX
ITeIO Enterprise Procurement Data Model Reference
Note: In order to browse a table, open the SAP HANA System View, open the catalog tree and the schema RDP160,
there right-click on a table and select > Open Content from the context menu.