SlideShare a Scribd company logo
1 of 170
Download to read offline
Student Exercise Manual
DISCLAIMER:
All systems mentioned in this document are for illustrative
purposes only and are not accessible systems for internal use.
Please exericse caution and common sense when using this
infomation out at customer sites.
Name
SAP HANA 1.0
Date: 23.06.2010
Version: V1.0
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 2
Lesson 2: Overview
This section includes an exercise on look and feel of the HANA Studio. You will complete the exercise by creating
your own package where you will save all your models.
2.1 Exercise: Look and Feel
1. Start the SAP HANA Studio from the
Programs Menu.
2. Register a new System. Click > Register
System within the Navigator view.
 Enter the Hostname, Instance
Number and Description.
(see screenshot for details)
 Click > Next.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 3
3. Enter your assigned User and
Password credentials.
 Use studentxx where xx represents
your assigned number
 The password is
 Click > Finish.
4. You will be asked to change your
password.
5. Change the password to
6. Click Ok.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 4
7. The whole perspective setup can be
maintained via the Window menu on
top.
 You have access via Window ->
Open Perspective -> Other to all
pre-delivered and saved
perspectives.
8. To switch easily between different
perspectives you can click on the
toolbar on top on the corresponding
button.
 Each open perspective will be
shown here.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 5
9. Customize a perspective choose the
Window menu -> Customize
Perspective.
10. In the perspective customization the
user can change Tool Bar, Menus,
Command Group Availabilities and
Shortcuts.
 If an element is greyed out it means
this element is not available.
 Please keep in mind that the studio
is running in the Eclipse Framework
and not all components of Eclipse
are required for HANA.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 6
11. To open a new view just go to the
window menu again and drop down
menu Show View -> Other...
12. In the “Show View” dialog box you can
choose which view you want to add to
your perspective.
 Next, drag and drop the view to the
location of choice where you desire
the view to show up.
 You can drag the view to a sidebar;
put the view as footer or on top of
the perspective.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 7
13. For the In-Memory Computing Studio
the central point of Access is the
Navigator View, which is usually placed
on the left side of the screen.
 In the Navigator tree you can
incorporate several HANA instances
directly connected with the
appropriate user.
 Note that there are two main
sections in the navigation tree.
o The Catalog node navigates
to the physical tables,
views, etc.
o The Content node
navigates to Attribute
Views, Analytic Views and
Calculation Views,
Functions and Analytical
Privileges
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 8
14. The Catalog contains all Database
schemas which will be automatically
created when a user is created.
 Each Schema contains a folder for
Column Views, Functions, Tables
and Views.
 Also notice the Catalog has a folder
for Authorizations.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 9
15. The Folder “Content” contains the
Information Model packages.
 Each package contains a folder for
Attribute Views, Analytic Views,
Calculation Views, Analytic
Privileges and Procedures.
16. The Navigation tree can be customized
via a small dropdown icon.
17. In the Navigation tree customizing you
can select which items should show up
in the tree as a node and which should
not show up.
 You can show/hide the Information
models in the Administration
console, show/hide the
Administration node, etc.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 10
18. After customizing you can always reset
your perspective to restore the defaults.
 Reset the Perspective now in
preparation for the step 25.
19. The Administration console reflects the
pre-delivered Administration
Perspective.
 To get to this screen, choose the
Navigate tab followed by a click on
the „administrative‟ icon (looks like
tools).
 According to your user rights you
have in this perspective options to
administrate the HANA Instances.
20. Create a delivery unit that will contain all
your models. Delivery units can be
transported.
 First Open the Information Modeller
perspective.
 From the Help menu > Select Quick
Launch.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 11
21. Select Delivery Units from the Setup
section.
22. Click on Create.
23. Enter STUDENTXX for the Name
and Responsible person, enter 1.0 for
the Version. Remember to replace
XX with your assigned student
number.
HINT: In order to create delivery
units ensure that your user ID has
the following System Privileges
assigned.
REPO.MAINTAIN_DELIVERY_UNITS
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 12
24. Verify that your Delivery unit is
created.
25. Create a new package. Select the
Content folder > Right Click > New
Package.
26. Enter student00 for the package
name & description. Ensure to select
your Delivery Unit (STUDENTXX).
27. As a result you should see your
package including the following
folders.
28. Select your package and verify that
the Delivery unit is assigned
correctly. The delivery unit
assignment can be changed here as
need be.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 13
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 14
Lesson 3: Architecture Overview
This section includes an exercise on Architecture. The goal is to find out architecture-related information about some
tables.
In this section you will learn:
 How to see whether a table is in row store or in column store
 How to see what indexes are defined for a table.
We do this example for table “MARA” in the “SYSTEM” schema; and for table “P_SCHEMAS_” from the “SYS”
schema.
3.1 Exercise: Architecture
1. Log on to the In Memory Computing
Studio with your user.
 For this exercise it does not matter
whether you are using the
“Administration” perspective or the
“Information Modeler” perspective.
 So let‟s start looking for table
“MARA”.
2. In the “Navigator” Tree, expand the node
“Catalog”
3. Expand the node for the “SYSTEM”-
Schema. You may try what happens
when you expand the “Tables” folder
within that schema.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 15
4. This shows the tables in that schema.
We don‟t want to search this way. So we
collapse the “Tables” folder again.
5. Right-click the “Tables” folder and select
“Filter” from the context menu. This
opens a dialog box.
6. In that dialog box, you can enter a table
name.
 Note: you are opening the list of
tables within schema “SYSTEM”.
 So there is no point in specifying the
schema name here. And not only is
there no point, it would also not
work. So we just enter the table
name.
 Enter “MARA” in the input field and
confirm with “OK”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 16
7. After a short while, this will filter the list
of tables by all tables whose names
starts with “MARA”.
8. Expand the list of tables. That list should
be greatly reduced.
9. The context menu for a table offers
several options. We are interested in the
table metadata which we can reach by
“Opening” the table Definition (or by
double-clicking the table”).
Other options which are not used here
include:
 Data Preview: Explore the table
contents
 Content: simple display of the table
contents.
 Definition: same as “Open
Definition”  metadata of table
10. Once you double-click the table, the
table definition is displayed.
 This screen shows the table
structure, i.e. all fields of the table
with their types etc.
 Whether the table is in column store
or in row store is shown in the top-
right corner of this screen.
 Notice that MARA is a column store.
Row stores are usually used to store
metadata or system tables.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 17
11. The key fields of the table are marked in
column “Key”.
 For MARA, these are the client and
the material number, aka “MANDT”
and “MATNR”.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 18
12. Now repeat the same exercise for
table “P_SCHEMAS_” from the “SYS”
schema.
You should be able to verify that:
 The table is a row-store table
There are two indexes defined:
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 19
Lesson 4: Modelling Overview
Lesson Objectives
The HANA 1.0 hosts an application tool called SAP In-Memory Computing Studio which incorporates the data
modelling function within Information Modeller.
After completing this lesson, you will be able to
 Use the Information Modeller
 Create Attribute, Analytic, and Calculation views:
 Add or remove text tables
 Create basic JOIN operations
 Activate and deploy views
 Export and import models
Scenario CO-PA
You are at a customer site and have been asked to build an Information Model for HANA for the purpose of
displaying CO-PA data. You have been asked to produce the following 3 reports. This section takes you through the
process to create the models to be used later in the reporting exercise.
Note the details of the CO-PA tables are covered in the presentation. You will only build a model for report 3.
Report 1: Actual Contribution Margin
Selection: Region
Country
City
a b c d = b-c e f = d-e g h = f-g
Volume
Gross
Revenue
Sales
Costs
Net
Revenue
Production
Variances CM 1
Expense
s CM 2
Region 1 Country A City 1 x x x x x x x x
City 2 x x x x x x x x
Total Country x x x x x x x x
Country D City 3 x x x x x x x x
City 4 x x x x x x x x
Total Country x x x x x x x x
Total Region x x x x x x x x
Region 2 Country E City 5 x x x x x x x x
City 6 x x x x x x x x
Total Country x x x x x x x x
Country G City 7 x x x x x x x x
City 8 x x x x x x x x
Total Country x x x x x x x x
Total Region x x x x x x x x
Total x x x x x x x x
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 20
4.1 Create the Attribute Views
1. Please navigate in the Information
Modeler to your own package.
 NOTE: Please make sure you select
your own package.
2. Create a new Attribute View:
 Select the Attribute View of your
package and using Right Mouse
Button Menu New > Attribute View
to create new Attribute View.
 Enter the name of the Attribute
View: LOCATION_XX and
description, Customer Location XX.
 Select Standard Attribute View
Type.
 Press next.
Report 2: Year on Year Comparisons Report 3: Plan /Actual Comparison
Selection: Sales Org Selection: Sales org
a b c = a - b Year
Current
Year
Last
Year Variance Plan Actual Variance
Product 1 x x x a Volume x x x
Product 2 x x x b Gross Revenue x x x
Product 3 x x x c Sales Costs x x x
Product 4 x x x d = b-c Net Revenue x x x
Product 5 x x x e Production Variances x x x
Product 6 x x x f = d-e CM 1 x x x
g Expenses x x x
Product 7 x x x h=f-g CM 2 x x x
Total x x x
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 21
3. From the SYSTEM schema select
the table KNA1 to build the Attribute
View.
 Enter KNA1 then press the filter
button.
 Proceed to select KNA1 and press
the Add button to move the table
into the Selected area.
Repeat the above steps to add T005U.
 Click Finish to get into the Attribute
View Editor
Tip: In case the dialog below "New
Attribute View" disappeared, you can
press the "Add table" butt and continue
the table selection.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 22
4. The Attribute View editor gets
populated with the selected tables.
 This is where you will define the
relationships of the attributes.
5. User will now select the fields for
use in the attribute view
 Select the key field KUNNR and
right mouse click on field. Choose
Add as Key Attribute.
 Result: The KUNNR:KNA1.KUNNR
shows in the Output frame.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 23
6. Display the properties of KUNNR.
Select KUNNR from the Output
frame.
 On the Property Tab for field
KUNNR, select Description Mapping
and choose the field
SYSTEM.KNA1.NAME1 from the
drop down list.
7. Join field LAND1 from KNA1 to
LAND1 of T005U as a text table
join.
 Click on the join and change the join
type in the property view.” Text
Table (Join Type)  1..1
(Cardinality)”. Select SPRAS for the
Language Column.
8. Join field REGIO from KNA1 to
T005U field BLAND.
 As before set the Join type to Text
Table, 1..1 (Cardinality) .
 Select as “Language Column” ->
SPRAS
 Save.
9. Add a second text table to the
attribute view.
 You can do it by selecting the "Add
table" button and continue the
table selection.
 Enter table T005T and select the
SYSTEM table from the list.
 Click OK.
 Result: Table T005T is added to the
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 24
Data Foundation tab.
10. Define a text join between field
LAND1 from KNA1 to field LAND1
from T005T
 Select the join and change the join
type in the property view.
 At the join “Property” frame select
as “Language Column” -> SPRAS
 HINT: Don’t forget to make the join
type = textTable.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 25
11. Add KNA1.LAND1 as an attribute ->
right click on LAND1 -> “Add as
Attribute.
 Select LAND1 from the Output
frame
12. On the Property Tab for field
LAND1, select Description Mapping
and choose the field
SYSTEM.T005T.LANDX
13. Add KNA1.REGIOas an attribute ->
right click on KNA1.REGION ->
“Add as Attribute”
14. Select KNA1.REGIO from the
Output.
 On the Property Tab for field
REGIO, select Description Mapping
and choose the field
SYSTEM.T005U.BEZEI.
 Save.
15. Add ORT01 as an attribute.
 This is a description field for CITY
so in this case there is no need to
map to a text table.
 Save.
16. On the Attribute View
LOCATION_XX, right click and
select Activate.
 Result: The Deployment Log will
show successful or give an error
message.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 26
HOT TIP: If presented with the error
message ‘attribute view needs at least
one key attribute or key measure’ – you
likely saved at a point in time when no
key attribute was selected. To solve this
problem, close the studio and open the
studio again. Activate the attribute view
without opening it.
17. Choose Attribute View,
LOCATION_XX. Right click to
choose Data Preview.
 Note that KUNNR, LAND1 and
REGIO has a description displayed
in the Data Preview due to the
description mapping assignment.
18. Navigate to the Catalog. Select the
folder _SYS_BIC, expand Column
Views and locate you View
studentxx/LOCATION_XX.
Hint: Locate your view using a filter.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 27
19. You may also display the definition
of the Attribute View, by right
clicking on the column view,
studentxx/LOCATION_XX and choose
Open Definition.
 This gives the table definition which
will be needed for reference when
creating an Attribute View for use on
Calculation Views. (We‟ll do this in a
later exercise.)
20. Next create a new Attribute View for
product.
 Name it PRODUCT_XX with
description PRODUCT_XX.
 Join table MARA and table MAKT
 Define the join as a text join on the
properties tab.
 Define the language column as
SPRAS on the Property Tab.
 HINT: Define the description
mapping for the key attribute
MAKT.MAKTX.
 Save, Activate & Preview.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 28
4.2 Create the Analytical View for Actuals
1. Close all open views prior to creating a
new analytical view.
 Create an analytical view CEA1_XX
with the description Contribution
Margin for Actuals.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 29
2. Find a table, CE1IDEA and click Add.
 Remember you have to find the
table by clicking on the arrow next to
the input field
 Important – Do not click finish or you
will have to start over.
 Click Next.
3. Navigate to your package, expand the
folder and select the attribute views for
PRODUCT_XX and LOCATION_XX.
 Click on Finish.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 30
4. Choose the Data Foundation Tab.
 Result: You will see table CE1IDEA
in your data foundation tab.
5. Navigate to the Logical View Tab to see
the two attribute views.
 Note that the Data Foundation is
empty.
 It will be filled once you select your
fields (attributes and measures)
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 31
6. Navigate to the Data Foundation Tab.
 Select the two fields KNDNR and
ARTNR from CE1IDEA and add
them as attributes (right click).
7. Navigate to the Logical Tab.
 Notice that the Data Foundation
now has two fields.
 Join DataFoundation.ARTNR to
PRODUCT_xx.MATNR.
 Join DataFoundation.KNDNR to
LOCATION_xx_KUNNR.
8. Navigate to Data Foundation Tab,
where we will define filters.
 Apply filters on the fields
PALEDGER and VRGAR (record
type).
 Select PALEDGER > right click >
Apply Filter.
o Choose Operator Equal
from the Apply Filter dialog
box
o Specify the value 01.
 For VRGAR, choose Operator Equal
and specify the value F.
 Save.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 32
9. Notice there is now a filter icon next to
the PALEDGER and VRGAR.
10. Next select the „private‟ attributes to be
included in the analytical view.
 Choose from CE1IDEA the
following fields in addition to
KNDNR and ARTNR:
o PERIO,
o VKORG,
o PLIKZ.
HINT: To find the fields quickly – enter the
name of the filed in the Find Column field.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 33
11. Next select the measures to be included
in the analytical view.
 Choose from CE1IDEA the following
fields: (Right click on the field > Add
ass measure)
o VV010
o VV070
o VV290
o VV960
12. Rename the measures in the Name field
of the Property Tab for each measure.
 Use copy and paste from the table
to ensure that use the exact
descriptions.
Change From Change To
VV010 GrossRevenue
VV070 SalesDeduction
VV290 ProductionVariance
VV960 OtherExpenses
 Save.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 34
13. Next define the calculated measures to
be included in the analytical view.
 Right click on Calculated Measures
and choose New.
14. Create the first Calculated Measure,
NetRevenue.
- Select Decimal data type with
length 15,0
- Double click on the desired
measure for it to appear in the
expression editor. Either type in
the minus sign or double click
on the Operator.
 Continue to create all other needed Calculated Measures.
Name Description Data Type Length Formula
NetRevenue Net Revenue DECIMAL 15 GrossRevenue - SalesDeduction
CM1 Contribution Margin 1 DECIMAL 15 NetRevenue - ProductVariance
CM2 Contribution Margin 2 DECIMAL 15 CM1 - OtherExpenses
 Save and Activate your Analytical View.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 35
15. Display the data in your Analytical View.
 Right click on Analytical View and
select Data Preview
4.3 Create the Analytical View for Plan
16. Close all open views prior to creating a
new Analytical view.
 Create an analytical view CEP1_XX
the with description Contribution
Margin for Planning.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 36
17. Find a table, CE2IDEA and click Add.
 Remember you can find the
table by clicking on the arrow
next to the input field
 Click Next.
 Important – Do not click finish
or you will have to start over.
18. Navigate to your package, expand it and
select attribute views for PRODUCT_XX
and LOCATION_XX.
 Click on Finish.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 37
19. Choose the Data Foundation Tab.
 You will see CE2IDEA in the data
foundation tab.
20. Choose the Logical View Tab to see the
two attribute views created previously.
 Note that the Data Foundation is
empty.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 38
21. Navigate to the Data Foundation Tab
again.
 Add KNDNR and ARTNR as
attributes (right click).
22. Navigate to the Logical Tab again.
 Notice the Data Foundation now has
two fields.
 Join fields ARTNR and MATNR.
 Join KNDNR and KUNNR.
23. Navigate to Data Foundation Tab,
where we will define further selections.
 Apply filters on the fields
PALEDGER and VRGAR (record
type).
 Select PALEDGER > right click >
Apply Filter.
o Choose Operator Equal from the
Apply Filter dialog box
o Specify the value 01.
 For VRGAR, choose Operator Equal
and specify the value F.
 Save.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 39
24. Notice there is now a filter icon next to
the PALEDGER and VRGAR.
25. Next select the attributes to be included
in the analytical view.
 Choose from CE2IDEA the following
fields including KNDNR & ARTNR:
o PERBL,
o VKORG.
26. Next select the measures to be included
in the analytical view.
 Choose from CE2IDEA the following
fields:
o VV010001
o VV070001
o VV290001
o VV960001
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 40
27. Rename the measures in the Name field
of the Property Tab for each measure.
 Use copy and paste to ensure the
exact names.
Change From Change To
VV010001 GrossRevenue
VV070001 SalesDeduction
VV290001 ProductionVariance
VV960001 OtherExpenses
 Save.
28. Next define the calculated measures to
be included in the analytical view.
 Right click on Calculated Measures
and choose New.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 41
29. Create the first Calculated Measure,
NetRevenue.
- Select Decimal data type with
length 15, 0
- Double click on the desired
measure for it to appear in the
expression editor. Either type in
the minus sign or double click
on the Operator.
 Continue to create all other needed Calculated Measures.
Name Description Data Type Length Formula
NetRevenue Net Revenue DECIMAL 15 GrossRevenue - SalesDeduction
CM1 Contribution Margin 1 DECIMAL 15 NetRevenue - ProductVariance
CM2 Contribution Margin 2 DECIMAL 15 CM1 - OtherExpenses
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 42
30. You should have the following
Calculated Measures.
31. Save and activate your Analytical view.
Preview the Analytical view as well to
see if you get data.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 43
4.4 Create the Calculation View
21. Navigate to the Calculation View
folder under your student package.
Right click to create a new
Calculation View.
 Name you calculation view
CE_PLAN_ACTUAL_00
 Specify Graphical for the type of the
Calculation View.
 Click Next.
22. Since we will be reading from
existing Analytical Views you do not
have to select any tables.
23. Click Next.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 44
24. Select the previously created 2
Analytical Views within the
studentXX package.
CEA1_00
CEP1_00
 Replace XX with your student
number.
 Click Finish.
25. As a result the Graphical Calculation
View editor will open.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 45
26. From the Tools Palette select 2
Projection graphical nodes one for
each Analytical View. This is where
you will set the Actual versus
Planned data indicator.
27. Click on each Projection node and
rename each to Projection_A and
Projection_P
28. Add a Union Graphical node and
Rename the node to Union.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 46
29. With the mouse pointer hover over
each graphical node and draw a
connection line between the nodes
as shown on the right representing a
data flow graph.
30. Add a new Calculated Column
called KPLIKZ.
31. In the diagram select the
Projection_A node. Within the
Output right click on Calculated
Columns > New.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 47
32. Enter KPLIKZ for the name of the
field. Select INTEGER with Length 1
and enter 0 in the Expression Editor
as the Planned Indicator value. Click
Add.
33. Ensure the Calculated Column is
visible in the Output of Projection_A.
34. Add all the fields of CEA1_XX to the
Output of the Projection_A node.
Select the Projection A node, within
the details view select all the fields >
Right Click > Add to Output.
HINT: Use the CNTRL key to select
multiple fields except !!!
** DO NOT ADD FIELD PLIKZ ***
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 48
35. Proceed to work on the
Projection_P node. As before add
the field KPLIKZ but this time set the
Expression value to 1 as an
indication for planned data.
36. Since we will eventually use a Union
to combine the results from both
Analytical views we have to ensure
that the field names are identical in
both views. After you have added all
of the CEP1_00 fields to the Output
select the field PERBL (within
Output of Projection_P) and then
within the properties view rename
the PERBL field to PERIO
37. Proceed to select and work with the
Union node. Within the details of the
Union CNTRL select all the fields
from the Projection_A node > Right
Click > Add to Target.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 49
38. The result will look as follows.
39. Scroll down and select all the fields
on the Projection_P node. Since we
want to combine the 2 analytical
views we need to map the fields
from both views to each other. Right
Click > Map to Target. You can also
select each individual field on the
left and drag & drop it over the
corresponding field on the right
hand side.
40. The completed Calculation View
mapping should look as follows.
41. Save your work.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 50
42. Click on the Output Node in the
main diagram. Within the Details
view pane select each field > Right
Click > „And the field as a Attribute‟
or as Measure according to the
following.
43. Activate and Preview.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 51
Optional Modelling Exercise 1 (Script Based Calculation View)
1. Create a Script based Calculation
View.
 Right click on Calculation view >
New > Calculation View.
2. Enter CE_PLAN_ACTUAL_02 for the
name of the Calculation view. Select
SQL Script for the type and be sure to
select your assigned Schema. Click
Finish.
3. The following screen opens.
4. In the left side of the diagram double
click on the Script Node. Before
entering code into the middle section
click on the structure icon within the
Outputs section in the right side of the
screen.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 52
5. Enter all the output fields according
including the corresponding Data
Type and Length.
HINT: You can find the complete list
of fields and data types at the end of
this section.
6. Refer to the Appendix and copy all
the SQL code statements and past it
between the BEGIN & END section
replacing the “var_out = ...” code.
7. The completed SQL Script.
Remember to replace student00 with
your assigned number. Save your
work.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 53
8. Click on the Output Node in the
Scenario on the left hand side. Within
the Script View details select all the
Attributes > Right Click > Add as
Attribute to move the fields into the
outputs over to the right hand side of
the screen. Proceed to do the same
for the measures.
9. Save your work.
10. Activate and Preview.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 54
Optional Modelling Exercise 2 (Calculated Attributes)
1. Open the Attribute View
LOCATION_00 to add an additional
field ERDAT.
 Right click on view > Open.
2. Enter LOCATION_01. Make a copy
of the existing LOCATION_00
Attribute view within your assigned
package.
3. Right click on KNA > Content.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 55
4. Find the ERDAT field, the field is
made up of the year, month and
day. Within your calculated attribute
you will only display the year.
5. Close the Data preview.
6. Right Click on KNA1.ERDAT > Add
as Attribute.
7. Within the Output section on the
right of the screen. Right Click on
Calculated Attributes > New
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 56
8. Create a new Calculated Attribute
called YEAR. Select NVARCHAR(4)
as the data type. Within the
expression editor either copy the
following code or drag/drop/double
click the elements or functions to
copy them into the expression
editor.
midstr(string("ERDAT"),strlen(string("ERDAT"))-9,4)
9. When done Click Add.
10. The completed Output structure
should look as follows.
11. We are only interested in the YEAR
field. Proceed to hide the ERDAT
field. Click on the ERDAT attribute >
in the Properties change the Hidden
attribute to True.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 57
12. Activate & Preview the view.
13. Remember to Activate any
analytical views and calculation
views that use this modified
Attribute view.
HINT: If you do not see any Calculated
Attributes in the preview make sure to
change the parameter within your
Preferences.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 58
Optional Modelling Exercise 3 (Procedures)
1. Create a new Procedure that you
can call from within a Calculation
View.
 Right click on Procedures >
New > Procedure..
2. Enter the function name; select the
Database Schema where the
tables are located. Click Finish.
3. Find the Input Pane on the right
hand side and define the input
parameters of Procedure. Right
Click on Input Parameters > new
Scalar Parameter
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 59
4. Define 2 scalar input parameters,
IN_PERIO_FROM &
IN_PERIO_TO both VARCHAR 7.
5. Create a new Input Table Type
parameter structure. Right Click on
Input Parameters > New ..
6. Name the table type output
structure STRIPDECIN_TT. Add
the following fields ...
PERIO NVARCHAR (7)
VVGRW DECIMAL(15,3)
VV010 DECIMAL (15,3)
7. Define the output Parameter
structure of the function. Right click
on Output Parameters > New ...
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 60
8. Name the table type output
structure STRIPDEC_TT. Add the
following fields ...
PERIO NVARCHAR (7)
VVGRW DECIMAL(15,3)
VV010 DECIMAL (15,3)
9. When done Click Ok.
10. The completed Input and Output
Parameters should look as follows.
11. Add the following SQL statement to
the Script View in the middle of the
screen; you can copy the code
from Appendix.
Note: Pay attention to the naming
of the variables, field names input
and output parameters – they have
to be the same as define in the
input and output parameters.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 61
12. Save & Activate the Procedure
Calling a procedure
example from within a
Calculation View.
CALL <PROCEDURE> <OUPUT_PARAM(0-N), INPUT_PARAM(O-N>
HINT: You can test procedures from within the SQL Editor by passing in null
for the output structures. Add 2 single quotes for Scalar string values
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 62
Optional Modelling Exercise 4.1 – (Time based Attribute View)
1. Open the Quick Launch Page
 From the Help Menu > Quick
Launch.
2. Click on Generate Time Data
underneath Data.
3. Select Gregorian as the Calendar Type.
4. Enter 2007 to 2008
5. Select DAY for the Granularity
6. Click Generate. (Note: Depending on
your authorization privileges you might
need more rights to generate data)
7. Check the Generated data within the
table _SYS_BI.M_TIME_DIMENSION.
There should be an entry for every DAY
between 2007 and 2008.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 63
8. Create a new Gregorian Time based
Attribute view
 Right Click on Attribute View > New
> Attribute View.
9. Enter TIME_00 for the name of
the view
 Select Time  Gregorian.
 For the Granularity select
Date
 Click on Auto Create.
 Click Finish.
10. As a result you will see the Dimensions
table with the generated Attributes.
Optionally you can remove any attribute
fields that are not needed.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 64
11. Right Click on the Attribute View >
Activate.
12. Right Click on the Attribute View >
Preview.
13. Use the Attribute view within a newly
created Analytical View.
 Right Click on Analytical Views >
New > Analytical View.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 65
14. Enter CET1_00 and copy the COPA
Actual Analytical view.
15. Select Copy From > Browse >
studentXX.CEA1_00
16. Click Finish.
17. Add HZDAT as an Attribute. Right click
on HZDAT > Add As Attribute.
18. Open the Logical View of the
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 66
19. Create a Referencial (n ..1) join between
TIME_00.DATE_SAP and Data
Foundation HZDAT field.
20. Activate & Preview.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 67
Optional Modelling Exercise 4.2 – (Fiscal year Time based Attribute View)
1. Generate the master data from the
specific time frame that you are
interested in
 On the Quick Launch Page > Data >
Generate Time Data.
2. Verify the generated data within
_SYS_BI.M_FISICAL_CALENDAR
3. Create a new Fiscal Time based
Attribute view
 Right Click on Attribute View > New
> Attribute View.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 68
4. Enter FISCAL_00 for the name
of the view
 For the Calendar Type
Select  Fiscal.
 For the variant select
K4:800
 Click on Auto Create.
 Click Finish.
5. As a result you will see the fiscal
calendar table with the generated
Attributes. Optionally you can remove
any attribute fields that are not needed.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 69
6. Right Click on the Attribute View >
Activate.
7. Right Click on the Attribute View >
Preview.
8. Use the Attribute view within a existing
Analytical View CET1_00.
 Right Click on Analytical View >
Open.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 70
9. Open the logical view.
10. Drag the FISICAL_00 attribute view into
the Analytical views logical view.
11. Create a join (referential n..1) between
FISCAL_00.DATE and the data
foundation HZDAT field.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 71
12. Activate & Preview.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 72
Export a Model
13. Based on what you‟ve learned thus far,
create a new attribute view under your
package.
 For the purposes of this exercise
make the view simple, one table, no
joins, etc.
 Name your view Dummyxx, where
xx represents your assigned number
14. Export your attribute view.
 Select File Export.
OR
 From the Quick Launch
screen, under Content,
Select  EXPORT
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 73
15. Select an Information Model to Export
and click NEXT
16. Select the source system you would like
to export from, Click NEXT.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 74
17. Highlight the Attribute View, Dummyxx,
click ADD
 Enter the target location for the
Export.
 Click FINISH
HINT: Use the path to the desktop. The
process will create a folder on the
desktop. The name of the folder should
be the same name as the system you
are logged into. Within the folder you will
find your new exported file.
 The status of the export in the
deployment log should say
“Success”.
 If you double click on the log entry
you can see the details of the job
18. Navigate to the location of the file
 Open the file to ensure the XML is
there.
 Congratulations, you‟ve exported
your first file!
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 75
5.6 Import a Model
19. Now that the export was successful,
import the xml file that was created
during the export to the RKT system
under your own package.
 Select File  IMPORT
OR
 From the Quick Launch view, under
CONTENT, Select IMPORT
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 76
20. Select an import source  Information
Models, Click > NEXT
21. Select the system to import to and Click
NEXT
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 77
22. Navigate to the file location, Select the
view to import, click ADD and then
select FINISH
23. Look at the Deployment Log status of
the import.
 It appears the import of the
attribute view failed.
 The reason for the failure is the
view already existed.
 Delete the view from your package
and re-import.
 Confirm the status in the
deployment log is Success
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 78
Lesson 5: Reporting
This section includes exercises on various BI client tools: Microsoft Excel, SAP BusinessObjects Analysis,
Explorer, Dashboards, Web Intelligence and SAP Crystal Reports 2011.
After completing this lesson, you will be able to
 Understand reporting options via ODBO, ODBC and JDBC
 Execute reports via select reporting applications (Excel, Crystal Reports) via these interfaces
 Describe the basics of configuring these connections.
 Understand reporting via and connectivity options from SAP Business Intelligence 4.0
5.1 Advanced Analysis, Office edition using a local ODBC connection
Introduction
A pre-release version of Advanced Analysis, Office edition (AAO) has been installed on the training
system. In this exercise you will use AAO to connect to HANA through a locally defined ODBC
connection.
The ODBC connection has already been configured by the administrator and the information that follows
is for your information only.
This exercise is using Microsoft Excel 2007 which is a 32-bit application; therefore we will be using the
32-bit ODBC client driver. The ODBC DSN was created with the 32-bit ODBC Administrator tool.
Although AAO uses an ODBC connection and protocol, it is internally the SAP proprietary BICS object
model to process request to and responses from the IMDB server.
Exercise Steps
1. Start AAO from the Start Menu:
a. Start Menu
b. Programs
c. SAP BusinessObjects
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 79
d. Analysis for Microsoft Excel
2. Start the “Select Data Source” wizard:
3. In order to use a local ODBC connection (instead of authenticating against BOE and using a relational
DB connection published to CMC), click “skip” in the wizard:
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 80
4. Select the ODBC connection named “HANA HDB”, click “Next”
5. Enter your HANA user name and password, click “OK”:
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 81
6. Find and expand your package (studentXX), select one of the views you have created, click “OK”
7. A report based on that view is shown.
8. Drag and drop dimensions and measures in the rows and columns to navigate in that view and build
your report
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 82
To filter members or measures, right click on the row or column item
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 83
5.2 Microsoft Excel Pivot Tables (ODBO/MDX access)
This exercise focuses on the basics of Excel Pivot Table access to HANA data. Excel Pivot Table access is
provided via a native ODBO (OLE DB for OLAP). The ODBO client driver allows any ODBO-enabled
client to report off HANA via MDX queries. Excel 2007 is one example of such client application.
1. Initiate the Excel Data Connection
Wizard
 Click on the DATA menu
 Select “From Other Sources”
 Select “From Data Connection
Wizard”
 Result: “Data Connection Wizard”
launches
2. Select Other/Advanced drivers then
click “NEXT”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 84
3. Select “SAP NewDB MDX Provider”
(Naming as of RKT delivery time)
Click “Next” (do not click “OK” and do
not double-click “SAP NewDB MDX
Provider”
4. Enter system logon info provided by
your instructor.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 85
5. Select a cube (analytic or calculation
view) from the “database” selection.
 Select studentxx from the dropdown
(student00 if there are none of your
own)
 Select “CE_PLAN_ACTUAL_00”
 Click NEXT
6. Accept the proposed file name for
storing the data connection.
 Enable “Save password in file”
(Saving password is a
recommended setting for this RKT
exercise)
 Carefully read the confirmation
dialog : click “Yes” in the
confirmation dialog
 Click “Finish” in the Data Connection
Wizard
7. To open the connection, simply accept
the proposed Pivot Table report
properties
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 86
8. An empty Pivot Table should appear,
and the list of fields available from the
right panel “PivotTable Field List”
9. Select fields from the right panel and
drag and drop them onto the row,
column and data items areas of the
PivotTable
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 87
5.3 Create a JDBC Connection onto the SAP BusinessObjects BI 4.0 server
This exercise is a preparation to the following exercises and the starting point for reporting on HANA from
the SAP BusinessObjects BI 4.0 platform. You will you use “Information Design Tool” to create a
relational DB connection into HANA, using the JDBC middleware driver for HANA.
In order to start Information Design tool, follow the menu path shown in the screenshot below:
- Start Menu
- Programs
- SAP BusinessObjects Enterprise XI 4.0
- SAP BusinessObjects Enterprise Client Tools
- Information Design Tool
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 88
1. Create a new Project
2. Name the project (and accept the
proposed project location)
3. Right-click the newly created project and
select “New -> Relational Connection
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 89
4. Name the connection and click Next
5. As database driver, select “SAP -> SAP
High-Performance Analytic Appliance
(SAP HANA) 1.0 -> JDBC Drivers”
Click Next
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 90
6. Keep the Authentication Mode set to
“Use specified username and password”
Note: on an environment where each
user must present his own credentials to
HANA because of user-level privileges,
one would select “Use BusinessObjects
credential mapping”. Refer to the User
Management lesson for details.
Enter your HANA user name
(STUDENTXX) and the password as
provided by the instructor
Enter the server connection string as
follows :
<hostname>:<port number>
Note: The hostname and port number
will be given to you by the instructor.
The port should be a 5 digit number that
follows this pattern: 3xx15 where xx is
the instance number.
Test the connection, if the connection
test is successful, click “Next”
7. Change the Connection Pool Mode to
“Disconnect after each transaction”
Leave the others parameters to their
default values
Click on “Finish”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 91
8. From the project folder, select the
connection you just created.
Right-click and select “Publish
Connection to a Repository”
9. Log on to the BI 4 using the connection
information provided by the instructor
System: <hostname>:<port number>
Username:
Password:
Authentication: Enterprise
Click on “Connect”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 92
10. Keep the default folder “Connections” as
the destination folder and click on
“Finish”
11. You should be asked whether you want
to create a shortcut to the newly
published connection.
Click “Yes”
Click “Close”
Your JDBC enabled Connection to HANA is now defined on the BI 4 system and available to BI front end
tools like SAP BusinessObjects Explorer.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 93
5.4 SAP BusinessObjects Explorer
In Internet Explorer, connect to SAP Business Objects Explorer on the BI 4 system. Use the connection
details provided by the instructor, the URL should look like this:
http://<hostname>:<portnumber>/explorer
Log on using the credentials provided by the instructor:
Language: English (United States)
System: <hostname>:<port number>
User: STUDENTXX
Password: training
Authentication: Enterprise
1. Click “Manage Spaces”:
2. Expand “SAP High-Performance Analytic Appliance (SAP HANA) 1.0”
Expand the Connection you created and published in the previous exercise “RC_STUDENTXX”
Select the Calculation View “studentXX/CE_PLAN_ACTUAL_00”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 94
3. Click on “New” to create a new Information Space on this calculation view.
4. From the Properties tab, enter a name “STUDENTXX_INFOSPACE”, check the option “Show on
Home page”, and select the Public Folder “HANA RKT”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 95
Go to the next tab “Objects”, add dimensions and measures to the Information Space by double
clicking (or drag and drop) on the objects listed in the left pane. Click “OK” when your selection is
made.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 96
5. “Index” your newly created information space:
Once the indexing completed, a green tick icon should appear in the status column.
6. From the top menu bar, go back to the “Home” tab
7. And refresh the list of information spaces available from the “Home” page :
8. Open the information space you have just created:
9. You are now ready to explore your data set
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 97
5.5 Create a Universe
In this exercise you use “Information Design Tool” to
- re-use the project and connection to HANA already defined earlier
- create a data foundation using that connection
- create a business layer based on the data foundation
- publish the universe to the BI 4.0 system
In order to start Information Design tool, follow the menu path shown in the screenshot below:
- Start Menu
- Programs
- SAP BusinessObjects Enterprise XI 4.0
- SAP BusinessObjects Enterprise Client Tools
- Information Design Tool
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 98
12. Create a new Data Foundation within
your project (created in exercise 6.3)
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 99
13. Name the Data Foundation
14. Choose type “Single Source”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 100
15. Select the secured connection you
have previously created. It should have
a file extension .cns
Click “Finish”
16. If prompted to re-open a session onto
the BI 4 system, enter your credentials
provided by the instructor
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 101
17. Browse the list of Schemas to find the
“_SYS_BIC” schema
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 102
18. Within that schema, identify the
calculation views you created earlier.
They should appear as tables named
studentxx/CE_PLAN_ACTUAL_00
studentxx/CE_PLAN_ACTUAL_02
studentxx/CE_PLAN_ACTUAL_04
19. Drag studentxx/CE_PLAN_ACTUAL_00
into the “Master” area of the screen.
20. Check that the connectivity works: right
click on the table and select the option
“Show Table Values...”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 103
21. A new tab should open and the data
retrieved from HANA (first 200 rows by
default)
22. Go back to the Data Foundation tab
23. Save the Data Foundation
24. Create a new Business Layer
25. Enter a name “ BL_STUDENTXX” and
click “Next”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 104
26. Select type “Relational Business Layer”
27. Select the Data Foundation you have
created in the previous step. Then click
“Finish”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 105
28. By default all fields are defined as
dimensions. Select the fields to turn into
measures, right click and select the
menu option “Turn into measure(s)”
29. For each measure, edit the “Select”
statement and add a SUM aggregation
function to it
Example: the SQL Select statement of
the Cm1 object will be defined as
SUM("_SYS_BIC"."student00/CE_PLAN_ACTUAL_0
0"."CM1")
30. Save the business layer
31. We will now enrich the universe with a
list of values and parameter that will be
reusable from the BI Client tools.
Go to the “Parameters and List of
Values” pane
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 106
32. Click on Insert a List of Values and
select the option “List of Values based
on business layer objects”
33. Enter a name for this new list of values
“Distinct Regions”
Click on “Edit Query”
34. Select the object “Regio” as a result
object and click on “View Script”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 107
35. Click on “Use Custom Query Script”
Go to the Query Script section where
the SQL Statement is defined
Add “DISTINCT” right after the SELECT
clause. This will allow us to only retrieve
distinct values for all the regions listed in
our calculation view
Click OK
And click OK again
36. You should be back to the business
layer definition screen. You may validate
your list of values by clicking on the
“preview” button
37. Click on the Insert Parameter icon to
create a new parameter
38. Enter a name “Distinct Region
Selection”
Leave all options to the default values
Enter a Prompt text that will be
displayed to end users “Select a region
from the list”
39. Point the list of values option to the list
of values “Distinct Regions” we created
in the previous step of this exercise
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 108
40. The next steps will create a test query to
validate a few objects of the universe.
Go to the “Queries” pane to create a test
query
Click on the “Insert query” icon
41. The query panel appears: you can
select dimension and measure objects
like end users would do from a BI Client
application.
Drag and drop the objects Ort01, Matnr, CM1 and CM2 into
the Result Objects area
Drag and drop the object Landx into the Query Filter area
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 109
42. From the Query Filter area, select the
operator “In List”, and the option “LOV”
43. Select the values US, MX and CA from
the list of values
Click “OK”
44. Click on the “Refresh” button from the
Partial Results area.
The first 200 rows of the result set
should display in the Partial Results
area
The test query executes fine. The
universe is now ready to be published
on to the BI 4.0 system.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 110
45. Save the Business Layer
From the project folder, right click on the
business layer file and select the option
“Publish / To a Repository...”
46. IDT will prompt you to do a Integrity
Check, first.
Select “Check All” to select all options to
be checked
Click on “Check Integrity”
47. This operation may take a few minutes
depending on the complexity of the
universe.
For the purpose of this training, you can
ignore the warning messages on lack of
primary keys.
Click “Next”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 111
48. Keep the default selected folder and
click on “Finish” to publish the universe
onto the BI 4.0 system
49. The universe is now published and
ready to be consumed by BI Clients like
Web Intelligence, Dashboards or Crystal
Reports for Enterprise
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 112
5.6 Dashboards (Xcelsius)
You will now create a dashboard with SAP BusinessObjects Dashboard Design Tool that consumes the
Universe you created earlier.
1. Open SAP BusinessObjects Dashboard Design Tool from the Start menu :
Start
Programs
Dashboard Design
Dashboard Design
2. If prompted by a warning message on Live Office compatibility, click “Yes”
3. From the Home page, click on “OPEN / Dashboard Design Object from Platform...”
4. Enter your BI 4 credentials provided by the instructor
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 113
5. Browse the Public Folders and expand the folder “HANA RKT” to select the Dashboard
“Dashboard Template”
6. The dashboard opens and should look like the following :
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 114
7. From the Query Browser panel, click on “Add Query”
8. You will now see a list of universes defined on your BI 4.0 system. Expand the folder Universes
and find the universe you published earlier “BL_STUDENTXX.unx”
9. Click on “Next”. You will see the same query panel you worked with in previous exercises. Select
the result objects Ort01, Cm1 and Cm2. Select a filter object Regio with an operator “Equal To”
and a value set to “Prompt”.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 115
10. To define the prompt, select the option “Use Universe Prompts”, select the object “Distinct Region
Selectoin” and click “OK”
11. Click “Next” on the Query Panel
12. The next screen will give you a preview of the result set returned by the query. Select a value from
the list of values and click on “Run”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 116
13. Verify the result set is correct and click “Next”
14. Leave all options to the default values and click “OK” on the following screen
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 117
15. The query now appears in the query browser pane
16. From the canvas, select the chart “Geography Analysis” and display its properties (right click /
properties). Select the “Series1” entry from the list, and map the Values(X) field to “Query Data”.
17. A pop up window is displays and lists the result objects from the query. Select the measure Cm1 as
the measure for the Series1 of this chart.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 118
18. Repeat the same steps with “Series2” and select Cm2.
19. Select Query Data for the Category Labels(Y) field, and select the dimension Ort01
20. The bar chart should now display values for the two series you defined.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 119
21. We will now map the prompt selector component to the filter object defined in the query. Display
the properties of the prompt selector
22. From the properties pane, set the “Source Prompt” property to “Query 1: Distinct Region
Selection:”
23. The dashboard is now ready to be published onto the BI 4.0 system and viewed by end users. Click
on File / Save to Platform As / Dashboard Design Object
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 120
24. Select the Public Folder “HANA RKT”, enter a name “STUDENTXX_DASHBOARD” and click
on Save
25. Open a web browser and connect to BI Launch Pad, the URL should look like this (exact URL will
be provided by the instructor): http://<hostname>:<port>/BOE/BI
26. Log on to BI Launch Pad with the credentials provided by the instructor:
System: <hostname>:<port>
Username: STUDENTXX
Password: ******
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 121
27. From the Home Page, go to the “Documents” tab
28. Go to the Public Folder “HANA RKT” and double click (or right click / View) on the dashboard
you just published “STUDENTXX_DASHBOARD”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 122
29. The dashboard should open in a separate tab. Select different values from the list (prompt selector)
and observe the bar chart being refreshed with live data from the HANA system.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 123
5.7 Crystal Reports 2011 using JDBC
Introduction
This example shows how to report off HANA via a JDBC-enabled connectivity using Crystal Reports
2011. This connectivity provides a relational access to HANA with SQL queries.
The information that follows is for your information only, the JDBC driver is already installed and
configured with Crystal Reports on the training system.
The JDBC configuration for Crystal Reports is done in the configuration file CRConfig.xml. For Crystal
Reports 2011, this file is located at:
<install folder>SAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java
The first parameter to modify is “classpath” in order for Crystal Reports 2011 to load the JDBC driver for
HANA. On a Windows machine, the default path to the JDBC driver file is
C:Program Filessaphdbclient
The text in bold has been added to the default configuration:
…
<Javaserver-configuration>
<DataDriverCommon>
<JavaDir32>…
<JavaDir64>…
<Classpath>C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/crlovmanifest.jar;C:Program
FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/CRLOVExternal.jar;C:Program FilesSAP BusinessObjectsSAP
BusinessObjects Enterprise XI 4.0java/lib/CRDBJDBCServer.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise
XI 4.0java/lib/CRDBXMLServer.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI
4.0java/lib/CRDBJavaBeansServer.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI
4.0java/lib/external/log4j.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI
4.0java/lib/CRDBSForceServer.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI
4.0java/lib/external/CRDBSForceExternal.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI
4.0java/lib/CRDBWicServer.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI
4.0java/lib/external/CRDBWicExternal.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI
4.0java/lib/external/CRDBXMLExternal.jar;C:Program FilesSAPhdbclientngdbc.jar;${CLASSPATH}</Classpath>
…
The second set of parameters to set is the JDBC driver itself: connection string to the HANA server and
main class of the JDBC driver. The connection string follows the following pattern:
jdbc:sap://<IMDB_host>:<IMDB_port>
where <IMDB_port> is the IMDB port number which follows the following pattern : 3xx15 and xx is the
instance number.
The main class of the JDBC driver is always defined as :
com.sap.db.jdbc.Driver
The text in bold has been added to the default configuration:
...
<JDBC>
<CacheRowSetSize>100</CacheRowSetSize>
<JDBCURL>jdbc:sap://lt0062.wdf.sap.corp:30215</JDBCURL>
<JDBCClassName>com.sap.db.jdbc.Driver</JDBCClassName>
...
Exercise Steps
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 124
1. Start Crystal Reports 2011
If prompted by a license evaluation
related message, click OK.
2. Click on “Blank Report” from the Start
page under “Create a new Report”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 125
3. A blank report should appear and the
“Database Expert” window should come
up. If not, select the menu option
“Database / Database Expert...”
Double click on “JDBC (JNDI)”
A new window comes up and presents
the connection string to the HANA
server that was pre-configured in the
CRConfig.xml file.
4. Enter the Database name as the HANA
System ID provided by your instructor.
Enter your credentials to the HANA
server that were provided by the
instructor :
STUDENTXX / training
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 126
5. Select a table from the list of tables, add
it to the selected tables column, click
“OK”
For example, select the table
SYSTEM.CE1IDEA
6. From the top menu, select “View / Field
Explorer”. This will display the list of
tables and fields available to your report.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 127
7. Select Fields for your report.
 Expand the table on the right in Field
Explorer.
 Select a few and drag into DETAILS
section of the report.
8. From the Preview menu, select Preview
Sample.
 Limit results to first 100 rows for
initial run
9. View results
 Try reformatting the data, sorting,
totalling etc.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 128
5.8 Crystal Reports 2011 using ODBC
Introduction
This exercise is very similar to the previous exercise; you will use Crystal Reports 2011 to report off
HANA in a relational manner (via SDL queries). You will, however, use an ODBC data connection (and
ODBC client driver) to HANA instead of JDBC. Note that from an end-user perspective there is no
significant functional difference between ODBC and JDBC.
The ODBC connection on the training system was configured by an administrator and the information that
follows is for your information only.
Crystal Reports 2011 is a 32-bit application and will use the 32-bit version of the ODBC driver for HANA.
The ODBC DSN entry was created from the 32-bit ODBC administrator tool which, on a 64-bit machine,
can be found at :
<windows install dir>sysWow64odbcad32.exe
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 129
Add a new DSN (Data Source Name)
 Switch to user or system DSN tab.
 Click ADD
 Select HDBODBC32
 Click Finish
10. Configure the DSN
 Click the Configure button
 Add Server information
 Note that the “Database” entry
should be the SID of your HANA
system
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 130
Exercise Steps
1. Start Crystal Reports 2011
If prompted by a license evaluation
related message, click OK.
2. Click on “Blank Report” from the Start
page under “Create a new Report”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 131
3. A blank report should appear and the
“Database Expert” window should come
up. If not, select the menu option
“Database / Database Expert...”
Double click on “ODBC (RDO)”
4. Select the DSN “HANA HDB” (same
entry that was used in the Analysis
Office exercise).
Click “Next”
5. Enter your credentials to the HANA
server that were provided by the
instructor :
STUDENTXX / training
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 132
6. Select a table from the list of tables, add
it to the selected tables column, click
“OK”
For example, select the table
SYSTEM.CE1IDEA
7. From the top menu, select “View / Field
Explorer”. This will display the list of
tables and fields available to your report.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 133
8. Select Fields for your report.
 Expand the table on the right in Field
Explorer.
 Select a few and drag into DETAILS
section of the report.
9. From the Preview menu, select Preview
Sample.
 Limit results to first 100 rows for
initial run
10. View results
 Try reformatting the data, sorting,
totalling etc.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 134
Exercise for Lesson 6 – User Management and Security
Goal:
This lesson will demonstrate which minimum set of privileges a user needs in order to read data from one
particular data model in HANA.
You will find a “reporting” user named “TESTXX” (XX being your group number) which you will supply
with sufficient privileges to read data from the data model you have created earlier.
In this Exercise you will do the following tasks:
- Add Package Privileges to user TESTXX
 these will allow browsing the list of packages and seeing the views inside of the packages
 it is only needed for preview from inside of HANA Studio. The privilege is not required for
using other reporting tools.
 for simplicity, we collected all require package privileges into one role.
- Add SQL privileges to user TESTXX
- Create an Analytic Privilege based on one of the Analytic Views you created
- Create an Analytic Privilege based on one of the Attribute Views you created
- Assign these Analytic Privileges to user TESTXX
- Verify that the security concept works as described.
Part 1: Add user “TESTXX” to your SAP HANA Studio:
1. Right-click the entry for System GBS in
the Navigator tree
Choose “Add Additional User”
2. Enter user name “TEST00”
Password
Klick “Finish”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 135
3. Enter and confirm the new password
Suggestion:
4. Right-click the new entry for System
GBS and user TestXX in the Navigator
tree
Choose “Refresh” from the context
menu
This will update the system status in
your Navigator tree.
Part 2: Check the Privileges assigned to user TESTXX
5. Open the user editor for user TESTXX
Work as user STUDENTXX
Navigate to the following path:
HDB (STUDENTXX)
 Default Catalog
 Authorization
 Users
Either: Right-click user TESTXX and
choose “Open”
Or: double-click user TESTXX
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 136
6. Check all tabs for the different types of
privileges (Granted Roles, SQL
Privileges, Analytic Privileges, System
Privileges and Package Privileges
Verify that the only granted privilege is
role “PUBLIC”
7. In the user editor for user TESTXX, set
the “Session Client” field to “800”
In our ERP tables, the client is 800.
If you have the default client for your
data models set to “dynamic”, the
Session Client from your user profile will
be substituted at query run time.
8. Save the user profile:
Either click the “Save” icon
Or hit “Ctrl+s”
We will continue using this user editor
for user TESTXX, so do not close it.
Part 3: Verify that the user cannot view your Analytic Views or the Calculation
View you have created:
9. Work as user TESTXX
Try navigating to the following path
HDB (TESTXX)
 Content
 studentxx
 Analytic Views
On trying to expand folder “Content” you
should receive an error message as
shown on the right.
This is because access to the content
tree (design time versions of Information
Models) is restricted by Package
Privileges. User TESTXX does not have
any Package Privileges assigned.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 137
Part 4: Add Package Privileges to user TESTXX
10. Switch to the user editor for user
TESTXX
Verify that the user who opened the
dialog is your user STUDENTXX
Within the editor, switch to tab “Granted
Roles”
11. We created a predefined role that
contains all privileges needed to browse
the Content Tree and allow you to
attempt a preview.
Click the green -icon to add a new
role to user TESTXX.
In the search dialog, start typing
“REPO_ADMIN”.
Once the “Search-as-you-type” finds the
desired role, highlight role
“REPO_ADMIN” in the list of “Matching
items”, then click “OK”
12. Save the user profile:
Either click the “Save” icon
Or hit “Ctrl+s”
We will continue using this user editor
for user TESTXX, so do not close it.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 138
Part 5: Verify that the user cannot view your analytic views nor the
calculation view you have created:
13. Work as user TESTXX
Right-click the Content-folder
Select “Refresh” from the context menu.
This should now show the list of all
packages in the system.
14. Work as user TESTXX
Navigate to the following path
HDB (TESTXX)
 Content
 studentxx
 Analytic Views
Right-click the Analytic View “CEA1_XX”
Select “Data Preview” from the context
menu.
(You may do the same for the other
Analytic Views or for the Calculation
view)
15. Data preview should give you an error
message as in the screenshot to the
right.
The reason for this message is that the
user is missing SQL privileges to access
the runtime object of the Analytic View.
The runtime object of the Analytic View
is the “Consumption Column View”
created in Schema _SYS_BIC.
That view is named:
_SYS_BIC.<package>/<view>
Part 6: Add SQL Privileges to the user
There are two ways to grant the SQL Privilege for accessing run-time objects of Information Models. The first way is
to use the user editor; the second one is to explicitly run a stored procedure for this purpose.
In this part of the exercise we grant the privilege via the user editor. The stored procedure will be demonstrated later.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 139
16. Again make sure the user editor for user
TESTXX is opened by user
STUDENTXX.
Switch to tab “SQL Privileges”.
Click the -icon
17. In the search window, start typing
“studentXX/CEA1_XX” (where both
occurences of XX must be replaced by
your group number).
Hint: including the package name in the
search will greatly help you find the
required view (compared to only trying
to search for “CEA1_XX”
Select the appropriate cube from the list
of “Matching items”.
Click “OK”.
18. Now you have selected the object for
which you want to grant SQL privileges,
you also have to choose what privilege
to grant.
For reading from an object, we need to
grant the SELECT-privilege.
Highlight the SQL Object
“studentXX/CEA1_XX”
Activate the check box for the
“SELECT”-Privilege.
19. Repeat the same for Analytic View
CEP1_XX.
You may try adding the Calcuation
View; however, the search dialog
typically does not find it…
In the next step, we will use an SQL
command to add this privilege to user
TESTXX.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 140
20. Save the user profile:
Either click the “Save” icon
Or hit “Ctrl+s”
We will continue using this user editor
for user TESTXX, so do not close it.
Part 7: Add the SELECT privilege for the Calculation View
21. Work as user STUDENTXX
Highlight the system entry for
“GBS (STUDENTXX)”
In the Navigator tree.
Click the Icon for the SQL editor
22. In the SQL editor, type the following
command (replacing XX by your team
number):
CALL
SYSTEM.GRANT_SELECT_ON_VIEW (
'_SYS_BIC."studentXX/CE_PLAN_
ACTUAL_XX"', 'TESTXX' );
Take care to set the quotes in exactly
the correct way:
Both parameters (the view name and
the user name) have to be enclosed in
single quotes.
Within the view name, the schema
name (_SYS_BIC) must not be
enclosed in double quote, whereas the
name of the object inside of the schema
(here:
studentXX/CE_PLAN_ACTUAL_XX)
has to be enclosed in double quotes.
Execute the statement by clicking the
green arrow or hitting the “F8”-key.
23. Verify that user TESTXX has SQL
SELECT PRIVILEGES for all three
views.
You have to re-open the user editor for
user TESTXX in order to see the most
recent state of the user profile.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 141
Part 8: Verify that the user still cannot read from the views
24. Work as user TESTXX
Navigate to the following path
HDB (TESTXX)
 Content
 studentxx
 Analytic Views
Right-click the Analytic View “CEA1_XX”
Select “Data Preview” from the context
menu.
25. Data preview should give you a different
error message now, see the screenshot
to the right.
The reason for this message is the user
has SQL access to the run time object,
but is still missing an Analytic Privilege.
You may test this for the other views as
well.
Part 9: Create an Analytic Privilege based on Analytic View CEA1_00
Please be very careful when working on this part. Analytic Privileges can presently only be activated once. If you
need to change the Analytic Privilege after it has been successfully activated, you will have to delete it and re-create
it from scratch.
In the following we are going to grant Analytic Privileges to user TESTXX which will finally allow reporting off the
Analytic and Calculation Views. We are restricting access to only Material Number „P-103‟.
In this first step, we will define the restriction directly the MATNR-field of view CEA1_00.
26. Work as user STUDENTXX
Navigate to the following path
HDB (STUDENTXX)
 Content
 studentxx
 Analytic Privileges
Right-click the folder name “Analytic
Privileges”
Select “New”  “Analytic Privilege” from
the context menu.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 142
27. In the creation wizard, type the name:
AP_CEA1_P103_XX
(replacing XX appropriately)
Enter a description
Click “Next”
28. In the second step of the wizard, select
your view studentXX/CEA1_XX
Highlight that view in the Content tree
on the left.
Click “Add”  this will add the view to
the right-hand part of the display.
Click “Finish”.
29. Implementing the privilege is now done
in three steps:
1) Select further views for which this
privilege should be valid (optional)
We will not add further views in this
step.
2) Select attributes on which a restriction
shall be defined
(All fields of all views selected in 1)
will be offered)
3) Define value restrictions for the
attributes selected in 2)
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 143
30. Add the field “MATNR” to the list of
“Associated Attributes Restrictions”.
Click the corresponding “Add” button
Select field “MATNR” from the
presented field list
Click “OK”
31. Define the value restriction for field
“MATNR”
Highlight the MATNR field under
“Associated Attributes Restrictions”
Click the “Add” button for “Assign
Restrictions” (this increases the counter
for the number of restrictions for
MATNR)
Click into the “Value” field in “Assign
Restrictions”. Click the “…”-icon.
In the search window, search for
Material P-103
Select the material from the search list
Click OK
(Note: you could also have typed in the
value directly, without opening the
search window).
32. Save the Analytic Privilege:
Either click the “Save” icon or hit
“Ctrl+s”.
Then activate the Analytic Privilege
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 144
Part 10: Assign Analytic Privilege AP_CEA1_P103_XX to user TESTXX
33. For granting Analytic Privileges, there
are two possibilities: via the User Editor
in SAP HANA Studio; or via SQL
statements.
We first show how to use the User
Editor:
Work as user STUDENTXX
Open the User Editor for user TESTXX
In that Editor, switch to tab “Analytic
Privileges”
34. Click the green “+”-icon
In the search dialog, start typing
“studentXX/AP_CEA1_P103_XX”
(replacing XX appropriately)
From the list of “Matching items”, select
privilege
“studentXX/AP_CEA1_P103_XX”
Click “OK”
35. Save the user profile:
Either click the “Save” icon
Or hit “Ctrl+s”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 145
Part 11: Verify that the user can read from Analytic View CEA1_XX
36. Work as user TESTXX
Navigate to the following path
HDB (TESTXX)
 Content
 studentxx
 Analytic Views
Right-click the Analytic View “CEA1_XX”
Select “Data Preview” from the context
menu.
37. Data Preview should now return a list of
474 output values.
Verify that the list contains only records
with MATNR = P-103
You may verify that preview still does
not work for Analytic View CEP1_XX nor
for the Calculation View.
Part 12: Create an Analytic Privilege based on Attribute View PRODUCT_XX
Please be very careful when working on this part. Analytic Privileges can presently only be activated once. If you
need to change the Analytic Privilege after it has been successfully activated, you will have to delete it and re-create
it from scratch.
38. Finally, we define an Analytic Privilege
that will allow reading from the second
Analytic View and from the Calculation
View.
Work as user STUDENTXX
Create a new Analytic Privilege inside of
package studentXX
Name this privilege
AP_CEP1_P103_XX
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 146
39. In the second step of the creation
wizard, select the Plan Data Analytic
View studentXX  CEP1_XX
Click “Finish”
40. We want this privilege to also apply to
the Calculation View
CE_PLAN_ACTUAL_XX and to
Attribute View PRODUCT_XX
For the list of “Reference Models”, click
the “Add” button
Choose Calculation View:
package studentXX
view CE_PLAN_ACTUAL_XX
And choose Attribute View
package studentXX
view PRODUCT_XX
Click OK
41. In order to provide an Attribute
Restriction on MATNR for the Analytic
View, we can choose the corresponding
field from Attribute View PRODUCT_XX:
Click the “Add” button for “Associated
Attribute Restrictions”
Select view
PRODUCT_XX (studentXX)
Choose field MATNR of that view
Click “OK”
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 147
42. Assign the restriction value for field
MATNR of the PRODUCT_XX Attribute
View:
Highlight Attribute PRODUCT_XX 
MATNR in the list of “Associated
Attribute Restrictions”
Click “Add” in screen area “Assign
Restrictions”
Enter value “P-103” (directly or via the
input dialog).
At this point, we have defined a restriction based on the Attribute View which is also going to be applicable for the
Analytic Views in the list of “Reference Models” – as long as these Attribute Views make use of the Attribute View.
This restriction does not apply to the Calculation View – although the Calculation View is also in the list of reference
models. We have to define an attribute restriction explicitly for a field from the Calculation View.
This restriction can be added to the same Analytic Privilege.
43. So add an Attribute Restriction for field
MATNR of the Calculation View
Click the “Add” button for “Associated
Attribute Restrictions”
Select view
CE_PLAN_ACTUAL_XX (studentXX)
Choose field MATNR of that view
Click “OK”
44. In order to provide an Attribute
Restriction on MATNR for the Analytic
View, we can choose the corresponding
field from Attribute View PRODUCT_XX:
Click the “Add” button for “Associated
Attribute Restrictions”
Select view
PRODUCT_XX (studentXX)
Choose field MATNR
Click “OK”
There is no need to define a restriction value for the Calculation View. The restriction to MATNR = P-103 is already
enforced on the two Analytic Views. So we can assign a “wildcard” restriction on the Calculation View.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 148
“Wildcard” restrictions can be defined by just selecting a field, without assigning a restriction value.
Thus, we are already finished building the Analytic Privilege.
45. Save the Analytic Privilege:
Either click the “Save” icon or hit
“Ctrl+s”.
Then activate the Analytic Privilege
Part 13: Assign Analytic Privilege AP_CEA1_P103_XX to user TESTXX
46. This time we are assigning the Analytic
Privilege using SQL statements:
Work as user STUDENTXX
Highlight the system entry for
“GBS (STUDENTXX)”
In the Navigator tree.
Click the Icon for the SQL editor
47. In the SQL editor, enter the following
statement:
CALL
SYSTEM.GRANT_ANALYTIC_PRIVILE
GE (
'"studentXX/AP_CEP1_P103_XX"'
, 'TESTXX' );
Take care to replace all three
occurrences of XX appropriately.
Execute the statement by clicking the
green arrow or hitting the “F8”-key.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 149
Part 14: Verify that the user can read from all Views
48. Work as user TESTXX
Navigate to the following path
HDB (TESTXX)
 Content
 studentxx
 Analytic Views
Right-click the Analytic View “CEA1_XX”
Select “Data Preview” from the context
menu.
(and accordingly for Analytic View
CEP1_XX and for Calculation View
CE_PLAN_ACTUAL_XX)
49. Data Preview should now return a list of
output values.
Verify that the list contains only records
with MATNR = P-103
The number of records to expect is:
CEA1_XX  474 records
CEP1_XX  130 records
CE_PLAN_ACTUAL_XX  604 records
Prerequisite: Create stored procedure wrappers
The following is not an exercise. Is it for information only.
Stored procedures are required in order to grant Analytic Privileges and in order to grant the SELECT Privilege on
the run time objects of Information Models (Consumption Column Views).
These stored procedures cannot be executed directly from the SQL editor of SAP HANA Studio. It is possible to
wrap the procedures into SQL Script Procedures. For reference, we list here the SQL statements for creating the
wrapper procedures employed in the above examples.
There are four stored procedures:
- GRANT_PRIVILEGE_ON_ACTIVATED_CONTENT
- REVOKE_PRIVILEGE_ON_ACTIVATED_CONTENT
- GRANT_ACTIVATED_ANALYTICAL_PRIVILEGE
- REVOKE_ACTIVATED_ANALYTICAL_PRIVILEGE
We wrap these into the following four SQL Script Procedures:
- GRANT_SELECT_ON_VIEW
- REVOKE_SELECT_ON_VIEW
- GRANT_ANALYTIC_PRIVILEGE
- REVOKE_ANALYTIC_PRIVILEGE
The SQL Script statements for creating these four wrapper functions are:
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 150
GRANT_SELECT_ON_VIEW
create procedure
GRANT_SELECT_ON_VIEW ( in i2 varchar(256),
in i3 varchar(256) )
language sqlscript
as
begin
call GRANT_PRIVILEGE_ON_ACTIVATED_CONTENT('SELECT', @i2@, @i3@);
end;
REVOKE_SELECT_ON_VIEW
create procedure
REVOKE_SELECT_ON_VIEW ( in i2 varchar(256),
in i3 varchar(256) )
language sqlscript
as
begin
call REVOKE_PRIVILEGE_ON_ACTIVATED_CONTENT('SELECT', @i2@, @i3@);
end;
GRANT_ANALYTIC_PRIVILEGE
create procedure
GRANT_ANALYTIC_PRIVILEGE ( in i1 varchar(256),
in i2 varchar(256) )
language sqlscript
as
begin
call GRANT_ACTIVATED_ANALYTICAL_PRIVILEGE (@i1@, @i2@);
end;
REVOKE_ANALYTIC_PRIVILEGE
create procedure
REVOKE_ANALYTIC_PRIVILEGE ( in i1 varchar(256),
in i2 varchar(256) )
language sqlscript
as
begin
call REVOKE_ACTIVATED_ANALYTICAL_PRIVILEGE (@i1@, @i2@);
end;
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 151
Lesson 7: Data Provisioning
This section includes an exercise on Data Services.
7.1 Exercise: Data Services
7.1.1 Create an SAP Datastore in SAP BusinessObjects Data Services
1. Open SAP BusinessObjects Data
Services Designer
 Start -> Data Services Designer
 Start -> All Programs -> SAP
BusinessObjects 4.0 -> SAP
BusinessObjects Data Services
2. Logon to the SAP BusinessObjects Data
Services Repository by entering the
following information and clicking on Log
On.
 System – verigtech11:6400
 User name – STUDENTXX
 Password – training
 Authentication - Enterprise
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 152
3. Select your repository (STUDENTXX)
and click OK.
4. Click on the Datastore tab in the lower
left-hand corner of the window.
5. Right-click in the empty window and
click on New.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 153
6. Enter the following...
 Datastore name – DS_ECC
 Datastore type – SAP Applications
 Application server – ibmcoe1lp23
 User name – RKT_USER
 Password – training
7. Click on Advanced and enter the
following...
 System number – 01.
8. Click OK.
This is what you will see in the Datastore tab
once your SAP Application Datastore has
been created. You will come back to this
later in the exercise.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 154
7.1.2 Import SAP ERP Metadata into the SAP HANA Database
Before importing metadata into the SAP
HANA Database, you must verify the
connection settings to your SAP
BusinessObjects Data Services instance.
Please note that the Import Server settings
are specific to a single HANA server
instance.
 Navigate to the Information Modeler
perspective and open the Quick Launch
view
 Click on the Manage Connections...
button and connect to the HANA
instance in which you wish to import
metadata
 Click on Configure Import Server
 If the configuration settings don‟t exist,
please enter the following entries, hit the
apply button and close.
 Server Address:
verigtech11.dhcp.wdf.sap.corp
 Repository Name: STUDENTXX
 ODBC Data Source: <empty>
 In the Content section of the Quick
Launch page, click on Import.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 155
 Open the Information Modeler folder if
it‟s not already opened.
 Click on the Source Objects node.
 Click on Next
 Select the target system and click Next.
 Select the DS_ECC source system
connection.
 The list of available connections
comes from Data Services. Only
SAP Application datastores are
listed as possible source
connections.
 Select Tables as the type of object to
import.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 156
 Type TCURR in the search box and
click on the button with the arrow on it.
 You can find objects by drilling into
the SAP ERP application hierarchy
or you can enter the text you want to
seach for. The search performs a
like search – *text* so that any
object that contains the text you
entered will be returned.
 Select the TCURR table and add it to
the Target.
 Select your target schema
(STUDENTXX) and click Next.
 Click on Validate.
 Make sure the status column has a
green checkbox.
 Click on Next.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 157
 Click on Finish
 Right click on the STUDENTXX Schema
in the Navigator pane and click on
Refresh.
You should now see the TCURR table under
the Tables folder.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 158
7.1.3 Import SAP ERP Metadata into SAP BusinessObjects Data Services
1. Go back to the SAP BusinessObjects
Data Services Designer and go to the
Datastore tab.
2. Select the DS_ECC Datastore you
created previously and make sure you
can see the Tables child node.
3. Right-click on the Tables node and click
on Import By Name...
4. Enter TCURR as the name of the table
you want to import.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 159
You can now use the TCURR table from the
DS_ECC Datastore as either a data source
or a data target. For this exercise, it will be
your data source.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 160
7.1.3 Import SAP HANA Database Metadata into SAP BusinessObjects Data
Services
1. From the Datastore tab, right-click and
click on New.
2. Enter the following connection details...
 Datastore name – DS_HANA
 Datastore type – Database
 Database type – HANA
 Database version – 1.x
 Data source – DS_HANA
 User name – STUDENTXX
 Password - training
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 161
3. Right-click on the Tables node of the
new HANA Datastore and click on
Import By Name...
4. Enter the following...
 Name - TCURR
 Owner – STUDENTXX
5. Click on Import.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 162
You can now use the TCURR table from the
DS_HANA Datastore as either a data source
or a data target. For this exercise, it will be
your data target.
SAP HANA 1.0 – Student Workshop
Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 163
7.1.3 Create a batch job in SAP BusinessObjects Data Services to extract data
from SAP ERP and load it into SAP HANA Database
1. Click on the Create Project link of the
Getting Started section.
2. Enter STUDENTXX as the project name
3. Click on Create.
4. In the Project Area located on the left
side, right-click on your new project and
click on New Batch Job.
5. Enter JOB_STUDENTXX as the name
of the new batch job
6. Click on the Dataflow icon from the
toolbar located on the right side of the
main SAP BusinessObjects Data
Services Designer window.
7. Click on the canvas to the left of the
toolbar to add a new Dataflow to your
new batch job.
8. Enter DF_STUDENTXX as the Dataflow
name.
Sap hana 1.0 training exercise manual
Sap hana 1.0 training exercise manual
Sap hana 1.0 training exercise manual
Sap hana 1.0 training exercise manual
Sap hana 1.0 training exercise manual
Sap hana 1.0 training exercise manual
Sap hana 1.0 training exercise manual

More Related Content

What's hot

Tecnologia dos Materiais 1
Tecnologia dos Materiais 1Tecnologia dos Materiais 1
Tecnologia dos Materiais 1
Luciano Santos
 
Telhas de fibrocimento
Telhas de fibrocimentoTelhas de fibrocimento
Telhas de fibrocimento
Joao Freire
 
Pendulo invertido com lógica Fuzzy
Pendulo invertido com lógica FuzzyPendulo invertido com lógica Fuzzy
Pendulo invertido com lógica Fuzzy
David Luna Santos
 
Instrumentacao 3-ano-petroleo-e-gas-capitulo-1
Instrumentacao 3-ano-petroleo-e-gas-capitulo-1Instrumentacao 3-ano-petroleo-e-gas-capitulo-1
Instrumentacao 3-ano-petroleo-e-gas-capitulo-1
Michael Batista
 
03.regua graduada, metro e trena
03.regua graduada, metro e trena03.regua graduada, metro e trena
03.regua graduada, metro e trena
Edvaldo Viana
 
Processos de fabricação
Processos de fabricaçãoProcessos de fabricação
Processos de fabricação
Luciano Santos
 

What's hot (20)

Metais nao ferrosos
Metais nao ferrososMetais nao ferrosos
Metais nao ferrosos
 
E-book – Acústica de Edificações
E-book – Acústica de EdificaçõesE-book – Acústica de Edificações
E-book – Acústica de Edificações
 
Portfólio riotech engenharia consultoria vistoria inspeção predial rj 2016
Portfólio riotech engenharia consultoria vistoria inspeção predial rj 2016Portfólio riotech engenharia consultoria vistoria inspeção predial rj 2016
Portfólio riotech engenharia consultoria vistoria inspeção predial rj 2016
 
Apostila tigre
Apostila tigreApostila tigre
Apostila tigre
 
Tecnologia dos Materiais 1
Tecnologia dos Materiais 1Tecnologia dos Materiais 1
Tecnologia dos Materiais 1
 
Telhas de fibrocimento
Telhas de fibrocimentoTelhas de fibrocimento
Telhas de fibrocimento
 
Ciência e-engenharia-dos-materiais
Ciência e-engenharia-dos-materiaisCiência e-engenharia-dos-materiais
Ciência e-engenharia-dos-materiais
 
Pendulo invertido com lógica Fuzzy
Pendulo invertido com lógica FuzzyPendulo invertido com lógica Fuzzy
Pendulo invertido com lógica Fuzzy
 
Corrosão de metais
Corrosão de metaisCorrosão de metais
Corrosão de metais
 
3 realatorio
3 realatorio3 realatorio
3 realatorio
 
Aula24
Aula24Aula24
Aula24
 
Qualificação de Procedimento
Qualificação de ProcedimentoQualificação de Procedimento
Qualificação de Procedimento
 
Papel e Celulose
Papel e CelulosePapel e Celulose
Papel e Celulose
 
Apostila concreto armado
Apostila concreto armadoApostila concreto armado
Apostila concreto armado
 
Instrumentacao 3-ano-petroleo-e-gas-capitulo-1
Instrumentacao 3-ano-petroleo-e-gas-capitulo-1Instrumentacao 3-ano-petroleo-e-gas-capitulo-1
Instrumentacao 3-ano-petroleo-e-gas-capitulo-1
 
03.regua graduada, metro e trena
03.regua graduada, metro e trena03.regua graduada, metro e trena
03.regua graduada, metro e trena
 
Titânio
TitânioTitânio
Titânio
 
Processos de fabricação
Processos de fabricaçãoProcessos de fabricação
Processos de fabricação
 
Alumínio
AlumínioAlumínio
Alumínio
 
Manutenção preditiva com termografia
Manutenção preditiva com termografiaManutenção preditiva com termografia
Manutenção preditiva com termografia
 

Similar to Sap hana 1.0 training exercise manual

Create a basic performance point dashboard epc
Create a basic performance point dashboard   epcCreate a basic performance point dashboard   epc
Create a basic performance point dashboard epc
EPC Group
 
SAP ERP S4HANAIntroductionMOTIVATIONThis material .docx
SAP ERP S4HANAIntroductionMOTIVATIONThis material .docxSAP ERP S4HANAIntroductionMOTIVATIONThis material .docx
SAP ERP S4HANAIntroductionMOTIVATIONThis material .docx
todd331
 
Sap step-by-step-navigation-guide-for-beginners
Sap step-by-step-navigation-guide-for-beginnersSap step-by-step-navigation-guide-for-beginners
Sap step-by-step-navigation-guide-for-beginners
Hossam Abdo
 
Maintain data in custom business object
Maintain data in custom business objectMaintain data in custom business object
Maintain data in custom business object
Ghassen B
 
770_0629.pdf dump for oracle cloud interface
770_0629.pdf dump for oracle cloud interface770_0629.pdf dump for oracle cloud interface
770_0629.pdf dump for oracle cloud interface
lknam1982
 
Tech ed 2012 eim260 modeling in sap hana-exercise
Tech ed 2012 eim260   modeling in sap hana-exerciseTech ed 2012 eim260   modeling in sap hana-exercise
Tech ed 2012 eim260 modeling in sap hana-exercise
Luc Vanrobays
 

Similar to Sap hana 1.0 training exercise manual (20)

DMM161_2015_Exercises
DMM161_2015_ExercisesDMM161_2015_Exercises
DMM161_2015_Exercises
 
Create a basic performance point dashboard epc
Create a basic performance point dashboard   epcCreate a basic performance point dashboard   epc
Create a basic performance point dashboard epc
 
EA261_2015_Exercises
EA261_2015_ExercisesEA261_2015_Exercises
EA261_2015_Exercises
 
Mdm255 exercise
Mdm255 exerciseMdm255 exercise
Mdm255 exercise
 
SAP ERP S4HANAIntroductionMOTIVATIONThis material .docx
SAP ERP S4HANAIntroductionMOTIVATIONThis material .docxSAP ERP S4HANAIntroductionMOTIVATIONThis material .docx
SAP ERP S4HANAIntroductionMOTIVATIONThis material .docx
 
Learn What's New in Tableau 9.0
Learn What's New in Tableau 9.0Learn What's New in Tableau 9.0
Learn What's New in Tableau 9.0
 
5001 accessing sap_hana_with_the_semantic_layer
5001 accessing sap_hana_with_the_semantic_layer5001 accessing sap_hana_with_the_semantic_layer
5001 accessing sap_hana_with_the_semantic_layer
 
SAC_Planning.pdf
SAC_Planning.pdfSAC_Planning.pdf
SAC_Planning.pdf
 
Sap hana tutorial
Sap hana tutorialSap hana tutorial
Sap hana tutorial
 
OBIEE: How to change dashboard background color or add background image
OBIEE: How to change dashboard background color or add background imageOBIEE: How to change dashboard background color or add background image
OBIEE: How to change dashboard background color or add background image
 
Sas visual analytics Training
Sas visual analytics Training Sas visual analytics Training
Sas visual analytics Training
 
Sap step-by-step-navigation-guide-for-beginners
Sap step-by-step-navigation-guide-for-beginnersSap step-by-step-navigation-guide-for-beginners
Sap step-by-step-navigation-guide-for-beginners
 
Maintain data in custom business object
Maintain data in custom business objectMaintain data in custom business object
Maintain data in custom business object
 
Bpc 10.0 NW Mass User Management tool
Bpc 10.0 NW Mass User Management toolBpc 10.0 NW Mass User Management tool
Bpc 10.0 NW Mass User Management tool
 
SAP HANA Developer Access Beta program - 7 steps towards your first HANA report
SAP HANA Developer Access Beta program - 7 steps towards your first HANA reportSAP HANA Developer Access Beta program - 7 steps towards your first HANA report
SAP HANA Developer Access Beta program - 7 steps towards your first HANA report
 
Découverte d'Einstein Analytics (Tableau CRM)
Découverte d'Einstein Analytics (Tableau CRM)Découverte d'Einstein Analytics (Tableau CRM)
Découverte d'Einstein Analytics (Tableau CRM)
 
sap_cloud_platform_tutorial.pdf
sap_cloud_platform_tutorial.pdfsap_cloud_platform_tutorial.pdf
sap_cloud_platform_tutorial.pdf
 
sap_cloud_platform_tutorial.pdf
sap_cloud_platform_tutorial.pdfsap_cloud_platform_tutorial.pdf
sap_cloud_platform_tutorial.pdf
 
770_0629.pdf dump for oracle cloud interface
770_0629.pdf dump for oracle cloud interface770_0629.pdf dump for oracle cloud interface
770_0629.pdf dump for oracle cloud interface
 
Tech ed 2012 eim260 modeling in sap hana-exercise
Tech ed 2012 eim260   modeling in sap hana-exerciseTech ed 2012 eim260   modeling in sap hana-exercise
Tech ed 2012 eim260 modeling in sap hana-exercise
 

Recently uploaded

Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
Wonjun Hwang
 

Recently uploaded (20)

Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 

Sap hana 1.0 training exercise manual

  • 1. Student Exercise Manual DISCLAIMER: All systems mentioned in this document are for illustrative purposes only and are not accessible systems for internal use. Please exericse caution and common sense when using this infomation out at customer sites. Name SAP HANA 1.0 Date: 23.06.2010 Version: V1.0
  • 2. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 2 Lesson 2: Overview This section includes an exercise on look and feel of the HANA Studio. You will complete the exercise by creating your own package where you will save all your models. 2.1 Exercise: Look and Feel 1. Start the SAP HANA Studio from the Programs Menu. 2. Register a new System. Click > Register System within the Navigator view.  Enter the Hostname, Instance Number and Description. (see screenshot for details)  Click > Next.
  • 3. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 3 3. Enter your assigned User and Password credentials.  Use studentxx where xx represents your assigned number  The password is  Click > Finish. 4. You will be asked to change your password. 5. Change the password to 6. Click Ok.
  • 4. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 4 7. The whole perspective setup can be maintained via the Window menu on top.  You have access via Window -> Open Perspective -> Other to all pre-delivered and saved perspectives. 8. To switch easily between different perspectives you can click on the toolbar on top on the corresponding button.  Each open perspective will be shown here.
  • 5. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 5 9. Customize a perspective choose the Window menu -> Customize Perspective. 10. In the perspective customization the user can change Tool Bar, Menus, Command Group Availabilities and Shortcuts.  If an element is greyed out it means this element is not available.  Please keep in mind that the studio is running in the Eclipse Framework and not all components of Eclipse are required for HANA.
  • 6. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 6 11. To open a new view just go to the window menu again and drop down menu Show View -> Other... 12. In the “Show View” dialog box you can choose which view you want to add to your perspective.  Next, drag and drop the view to the location of choice where you desire the view to show up.  You can drag the view to a sidebar; put the view as footer or on top of the perspective.
  • 7. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 7 13. For the In-Memory Computing Studio the central point of Access is the Navigator View, which is usually placed on the left side of the screen.  In the Navigator tree you can incorporate several HANA instances directly connected with the appropriate user.  Note that there are two main sections in the navigation tree. o The Catalog node navigates to the physical tables, views, etc. o The Content node navigates to Attribute Views, Analytic Views and Calculation Views, Functions and Analytical Privileges
  • 8. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 8 14. The Catalog contains all Database schemas which will be automatically created when a user is created.  Each Schema contains a folder for Column Views, Functions, Tables and Views.  Also notice the Catalog has a folder for Authorizations.
  • 9. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 9 15. The Folder “Content” contains the Information Model packages.  Each package contains a folder for Attribute Views, Analytic Views, Calculation Views, Analytic Privileges and Procedures. 16. The Navigation tree can be customized via a small dropdown icon. 17. In the Navigation tree customizing you can select which items should show up in the tree as a node and which should not show up.  You can show/hide the Information models in the Administration console, show/hide the Administration node, etc.
  • 10. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 10 18. After customizing you can always reset your perspective to restore the defaults.  Reset the Perspective now in preparation for the step 25. 19. The Administration console reflects the pre-delivered Administration Perspective.  To get to this screen, choose the Navigate tab followed by a click on the „administrative‟ icon (looks like tools).  According to your user rights you have in this perspective options to administrate the HANA Instances. 20. Create a delivery unit that will contain all your models. Delivery units can be transported.  First Open the Information Modeller perspective.  From the Help menu > Select Quick Launch.
  • 11. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 11 21. Select Delivery Units from the Setup section. 22. Click on Create. 23. Enter STUDENTXX for the Name and Responsible person, enter 1.0 for the Version. Remember to replace XX with your assigned student number. HINT: In order to create delivery units ensure that your user ID has the following System Privileges assigned. REPO.MAINTAIN_DELIVERY_UNITS
  • 12. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 12 24. Verify that your Delivery unit is created. 25. Create a new package. Select the Content folder > Right Click > New Package. 26. Enter student00 for the package name & description. Ensure to select your Delivery Unit (STUDENTXX). 27. As a result you should see your package including the following folders. 28. Select your package and verify that the Delivery unit is assigned correctly. The delivery unit assignment can be changed here as need be.
  • 13. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 13
  • 14. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 14 Lesson 3: Architecture Overview This section includes an exercise on Architecture. The goal is to find out architecture-related information about some tables. In this section you will learn:  How to see whether a table is in row store or in column store  How to see what indexes are defined for a table. We do this example for table “MARA” in the “SYSTEM” schema; and for table “P_SCHEMAS_” from the “SYS” schema. 3.1 Exercise: Architecture 1. Log on to the In Memory Computing Studio with your user.  For this exercise it does not matter whether you are using the “Administration” perspective or the “Information Modeler” perspective.  So let‟s start looking for table “MARA”. 2. In the “Navigator” Tree, expand the node “Catalog” 3. Expand the node for the “SYSTEM”- Schema. You may try what happens when you expand the “Tables” folder within that schema.
  • 15. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 15 4. This shows the tables in that schema. We don‟t want to search this way. So we collapse the “Tables” folder again. 5. Right-click the “Tables” folder and select “Filter” from the context menu. This opens a dialog box. 6. In that dialog box, you can enter a table name.  Note: you are opening the list of tables within schema “SYSTEM”.  So there is no point in specifying the schema name here. And not only is there no point, it would also not work. So we just enter the table name.  Enter “MARA” in the input field and confirm with “OK”
  • 16. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 16 7. After a short while, this will filter the list of tables by all tables whose names starts with “MARA”. 8. Expand the list of tables. That list should be greatly reduced. 9. The context menu for a table offers several options. We are interested in the table metadata which we can reach by “Opening” the table Definition (or by double-clicking the table”). Other options which are not used here include:  Data Preview: Explore the table contents  Content: simple display of the table contents.  Definition: same as “Open Definition”  metadata of table 10. Once you double-click the table, the table definition is displayed.  This screen shows the table structure, i.e. all fields of the table with their types etc.  Whether the table is in column store or in row store is shown in the top- right corner of this screen.  Notice that MARA is a column store. Row stores are usually used to store metadata or system tables.
  • 17. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 17 11. The key fields of the table are marked in column “Key”.  For MARA, these are the client and the material number, aka “MANDT” and “MATNR”.
  • 18. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 18 12. Now repeat the same exercise for table “P_SCHEMAS_” from the “SYS” schema. You should be able to verify that:  The table is a row-store table There are two indexes defined:
  • 19. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 19 Lesson 4: Modelling Overview Lesson Objectives The HANA 1.0 hosts an application tool called SAP In-Memory Computing Studio which incorporates the data modelling function within Information Modeller. After completing this lesson, you will be able to  Use the Information Modeller  Create Attribute, Analytic, and Calculation views:  Add or remove text tables  Create basic JOIN operations  Activate and deploy views  Export and import models Scenario CO-PA You are at a customer site and have been asked to build an Information Model for HANA for the purpose of displaying CO-PA data. You have been asked to produce the following 3 reports. This section takes you through the process to create the models to be used later in the reporting exercise. Note the details of the CO-PA tables are covered in the presentation. You will only build a model for report 3. Report 1: Actual Contribution Margin Selection: Region Country City a b c d = b-c e f = d-e g h = f-g Volume Gross Revenue Sales Costs Net Revenue Production Variances CM 1 Expense s CM 2 Region 1 Country A City 1 x x x x x x x x City 2 x x x x x x x x Total Country x x x x x x x x Country D City 3 x x x x x x x x City 4 x x x x x x x x Total Country x x x x x x x x Total Region x x x x x x x x Region 2 Country E City 5 x x x x x x x x City 6 x x x x x x x x Total Country x x x x x x x x Country G City 7 x x x x x x x x City 8 x x x x x x x x Total Country x x x x x x x x Total Region x x x x x x x x Total x x x x x x x x
  • 20. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 20 4.1 Create the Attribute Views 1. Please navigate in the Information Modeler to your own package.  NOTE: Please make sure you select your own package. 2. Create a new Attribute View:  Select the Attribute View of your package and using Right Mouse Button Menu New > Attribute View to create new Attribute View.  Enter the name of the Attribute View: LOCATION_XX and description, Customer Location XX.  Select Standard Attribute View Type.  Press next. Report 2: Year on Year Comparisons Report 3: Plan /Actual Comparison Selection: Sales Org Selection: Sales org a b c = a - b Year Current Year Last Year Variance Plan Actual Variance Product 1 x x x a Volume x x x Product 2 x x x b Gross Revenue x x x Product 3 x x x c Sales Costs x x x Product 4 x x x d = b-c Net Revenue x x x Product 5 x x x e Production Variances x x x Product 6 x x x f = d-e CM 1 x x x g Expenses x x x Product 7 x x x h=f-g CM 2 x x x Total x x x
  • 21. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 21 3. From the SYSTEM schema select the table KNA1 to build the Attribute View.  Enter KNA1 then press the filter button.  Proceed to select KNA1 and press the Add button to move the table into the Selected area. Repeat the above steps to add T005U.  Click Finish to get into the Attribute View Editor Tip: In case the dialog below "New Attribute View" disappeared, you can press the "Add table" butt and continue the table selection.
  • 22. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 22 4. The Attribute View editor gets populated with the selected tables.  This is where you will define the relationships of the attributes. 5. User will now select the fields for use in the attribute view  Select the key field KUNNR and right mouse click on field. Choose Add as Key Attribute.  Result: The KUNNR:KNA1.KUNNR shows in the Output frame.
  • 23. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 23 6. Display the properties of KUNNR. Select KUNNR from the Output frame.  On the Property Tab for field KUNNR, select Description Mapping and choose the field SYSTEM.KNA1.NAME1 from the drop down list. 7. Join field LAND1 from KNA1 to LAND1 of T005U as a text table join.  Click on the join and change the join type in the property view.” Text Table (Join Type)  1..1 (Cardinality)”. Select SPRAS for the Language Column. 8. Join field REGIO from KNA1 to T005U field BLAND.  As before set the Join type to Text Table, 1..1 (Cardinality) .  Select as “Language Column” -> SPRAS  Save. 9. Add a second text table to the attribute view.  You can do it by selecting the "Add table" button and continue the table selection.  Enter table T005T and select the SYSTEM table from the list.  Click OK.  Result: Table T005T is added to the
  • 24. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 24 Data Foundation tab. 10. Define a text join between field LAND1 from KNA1 to field LAND1 from T005T  Select the join and change the join type in the property view.  At the join “Property” frame select as “Language Column” -> SPRAS  HINT: Don’t forget to make the join type = textTable.
  • 25. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 25 11. Add KNA1.LAND1 as an attribute -> right click on LAND1 -> “Add as Attribute.  Select LAND1 from the Output frame 12. On the Property Tab for field LAND1, select Description Mapping and choose the field SYSTEM.T005T.LANDX 13. Add KNA1.REGIOas an attribute -> right click on KNA1.REGION -> “Add as Attribute” 14. Select KNA1.REGIO from the Output.  On the Property Tab for field REGIO, select Description Mapping and choose the field SYSTEM.T005U.BEZEI.  Save. 15. Add ORT01 as an attribute.  This is a description field for CITY so in this case there is no need to map to a text table.  Save. 16. On the Attribute View LOCATION_XX, right click and select Activate.  Result: The Deployment Log will show successful or give an error message.
  • 26. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 26 HOT TIP: If presented with the error message ‘attribute view needs at least one key attribute or key measure’ – you likely saved at a point in time when no key attribute was selected. To solve this problem, close the studio and open the studio again. Activate the attribute view without opening it. 17. Choose Attribute View, LOCATION_XX. Right click to choose Data Preview.  Note that KUNNR, LAND1 and REGIO has a description displayed in the Data Preview due to the description mapping assignment. 18. Navigate to the Catalog. Select the folder _SYS_BIC, expand Column Views and locate you View studentxx/LOCATION_XX. Hint: Locate your view using a filter.
  • 27. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 27 19. You may also display the definition of the Attribute View, by right clicking on the column view, studentxx/LOCATION_XX and choose Open Definition.  This gives the table definition which will be needed for reference when creating an Attribute View for use on Calculation Views. (We‟ll do this in a later exercise.) 20. Next create a new Attribute View for product.  Name it PRODUCT_XX with description PRODUCT_XX.  Join table MARA and table MAKT  Define the join as a text join on the properties tab.  Define the language column as SPRAS on the Property Tab.  HINT: Define the description mapping for the key attribute MAKT.MAKTX.  Save, Activate & Preview.
  • 28. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 28 4.2 Create the Analytical View for Actuals 1. Close all open views prior to creating a new analytical view.  Create an analytical view CEA1_XX with the description Contribution Margin for Actuals.
  • 29. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 29 2. Find a table, CE1IDEA and click Add.  Remember you have to find the table by clicking on the arrow next to the input field  Important – Do not click finish or you will have to start over.  Click Next. 3. Navigate to your package, expand the folder and select the attribute views for PRODUCT_XX and LOCATION_XX.  Click on Finish.
  • 30. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 30 4. Choose the Data Foundation Tab.  Result: You will see table CE1IDEA in your data foundation tab. 5. Navigate to the Logical View Tab to see the two attribute views.  Note that the Data Foundation is empty.  It will be filled once you select your fields (attributes and measures)
  • 31. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 31 6. Navigate to the Data Foundation Tab.  Select the two fields KNDNR and ARTNR from CE1IDEA and add them as attributes (right click). 7. Navigate to the Logical Tab.  Notice that the Data Foundation now has two fields.  Join DataFoundation.ARTNR to PRODUCT_xx.MATNR.  Join DataFoundation.KNDNR to LOCATION_xx_KUNNR. 8. Navigate to Data Foundation Tab, where we will define filters.  Apply filters on the fields PALEDGER and VRGAR (record type).  Select PALEDGER > right click > Apply Filter. o Choose Operator Equal from the Apply Filter dialog box o Specify the value 01.  For VRGAR, choose Operator Equal and specify the value F.  Save.
  • 32. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 32 9. Notice there is now a filter icon next to the PALEDGER and VRGAR. 10. Next select the „private‟ attributes to be included in the analytical view.  Choose from CE1IDEA the following fields in addition to KNDNR and ARTNR: o PERIO, o VKORG, o PLIKZ. HINT: To find the fields quickly – enter the name of the filed in the Find Column field.
  • 33. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 33 11. Next select the measures to be included in the analytical view.  Choose from CE1IDEA the following fields: (Right click on the field > Add ass measure) o VV010 o VV070 o VV290 o VV960 12. Rename the measures in the Name field of the Property Tab for each measure.  Use copy and paste from the table to ensure that use the exact descriptions. Change From Change To VV010 GrossRevenue VV070 SalesDeduction VV290 ProductionVariance VV960 OtherExpenses  Save.
  • 34. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 34 13. Next define the calculated measures to be included in the analytical view.  Right click on Calculated Measures and choose New. 14. Create the first Calculated Measure, NetRevenue. - Select Decimal data type with length 15,0 - Double click on the desired measure for it to appear in the expression editor. Either type in the minus sign or double click on the Operator.  Continue to create all other needed Calculated Measures. Name Description Data Type Length Formula NetRevenue Net Revenue DECIMAL 15 GrossRevenue - SalesDeduction CM1 Contribution Margin 1 DECIMAL 15 NetRevenue - ProductVariance CM2 Contribution Margin 2 DECIMAL 15 CM1 - OtherExpenses  Save and Activate your Analytical View.
  • 35. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 35 15. Display the data in your Analytical View.  Right click on Analytical View and select Data Preview 4.3 Create the Analytical View for Plan 16. Close all open views prior to creating a new Analytical view.  Create an analytical view CEP1_XX the with description Contribution Margin for Planning.
  • 36. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 36 17. Find a table, CE2IDEA and click Add.  Remember you can find the table by clicking on the arrow next to the input field  Click Next.  Important – Do not click finish or you will have to start over. 18. Navigate to your package, expand it and select attribute views for PRODUCT_XX and LOCATION_XX.  Click on Finish.
  • 37. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 37 19. Choose the Data Foundation Tab.  You will see CE2IDEA in the data foundation tab. 20. Choose the Logical View Tab to see the two attribute views created previously.  Note that the Data Foundation is empty.
  • 38. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 38 21. Navigate to the Data Foundation Tab again.  Add KNDNR and ARTNR as attributes (right click). 22. Navigate to the Logical Tab again.  Notice the Data Foundation now has two fields.  Join fields ARTNR and MATNR.  Join KNDNR and KUNNR. 23. Navigate to Data Foundation Tab, where we will define further selections.  Apply filters on the fields PALEDGER and VRGAR (record type).  Select PALEDGER > right click > Apply Filter. o Choose Operator Equal from the Apply Filter dialog box o Specify the value 01.  For VRGAR, choose Operator Equal and specify the value F.  Save.
  • 39. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 39 24. Notice there is now a filter icon next to the PALEDGER and VRGAR. 25. Next select the attributes to be included in the analytical view.  Choose from CE2IDEA the following fields including KNDNR & ARTNR: o PERBL, o VKORG. 26. Next select the measures to be included in the analytical view.  Choose from CE2IDEA the following fields: o VV010001 o VV070001 o VV290001 o VV960001
  • 40. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 40 27. Rename the measures in the Name field of the Property Tab for each measure.  Use copy and paste to ensure the exact names. Change From Change To VV010001 GrossRevenue VV070001 SalesDeduction VV290001 ProductionVariance VV960001 OtherExpenses  Save. 28. Next define the calculated measures to be included in the analytical view.  Right click on Calculated Measures and choose New.
  • 41. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 41 29. Create the first Calculated Measure, NetRevenue. - Select Decimal data type with length 15, 0 - Double click on the desired measure for it to appear in the expression editor. Either type in the minus sign or double click on the Operator.  Continue to create all other needed Calculated Measures. Name Description Data Type Length Formula NetRevenue Net Revenue DECIMAL 15 GrossRevenue - SalesDeduction CM1 Contribution Margin 1 DECIMAL 15 NetRevenue - ProductVariance CM2 Contribution Margin 2 DECIMAL 15 CM1 - OtherExpenses
  • 42. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 42 30. You should have the following Calculated Measures. 31. Save and activate your Analytical view. Preview the Analytical view as well to see if you get data.
  • 43. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 43 4.4 Create the Calculation View 21. Navigate to the Calculation View folder under your student package. Right click to create a new Calculation View.  Name you calculation view CE_PLAN_ACTUAL_00  Specify Graphical for the type of the Calculation View.  Click Next. 22. Since we will be reading from existing Analytical Views you do not have to select any tables. 23. Click Next.
  • 44. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 44 24. Select the previously created 2 Analytical Views within the studentXX package. CEA1_00 CEP1_00  Replace XX with your student number.  Click Finish. 25. As a result the Graphical Calculation View editor will open.
  • 45. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 45 26. From the Tools Palette select 2 Projection graphical nodes one for each Analytical View. This is where you will set the Actual versus Planned data indicator. 27. Click on each Projection node and rename each to Projection_A and Projection_P 28. Add a Union Graphical node and Rename the node to Union.
  • 46. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 46 29. With the mouse pointer hover over each graphical node and draw a connection line between the nodes as shown on the right representing a data flow graph. 30. Add a new Calculated Column called KPLIKZ. 31. In the diagram select the Projection_A node. Within the Output right click on Calculated Columns > New.
  • 47. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 47 32. Enter KPLIKZ for the name of the field. Select INTEGER with Length 1 and enter 0 in the Expression Editor as the Planned Indicator value. Click Add. 33. Ensure the Calculated Column is visible in the Output of Projection_A. 34. Add all the fields of CEA1_XX to the Output of the Projection_A node. Select the Projection A node, within the details view select all the fields > Right Click > Add to Output. HINT: Use the CNTRL key to select multiple fields except !!! ** DO NOT ADD FIELD PLIKZ ***
  • 48. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 48 35. Proceed to work on the Projection_P node. As before add the field KPLIKZ but this time set the Expression value to 1 as an indication for planned data. 36. Since we will eventually use a Union to combine the results from both Analytical views we have to ensure that the field names are identical in both views. After you have added all of the CEP1_00 fields to the Output select the field PERBL (within Output of Projection_P) and then within the properties view rename the PERBL field to PERIO 37. Proceed to select and work with the Union node. Within the details of the Union CNTRL select all the fields from the Projection_A node > Right Click > Add to Target.
  • 49. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 49 38. The result will look as follows. 39. Scroll down and select all the fields on the Projection_P node. Since we want to combine the 2 analytical views we need to map the fields from both views to each other. Right Click > Map to Target. You can also select each individual field on the left and drag & drop it over the corresponding field on the right hand side. 40. The completed Calculation View mapping should look as follows. 41. Save your work.
  • 50. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 50 42. Click on the Output Node in the main diagram. Within the Details view pane select each field > Right Click > „And the field as a Attribute‟ or as Measure according to the following. 43. Activate and Preview.
  • 51. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 51 Optional Modelling Exercise 1 (Script Based Calculation View) 1. Create a Script based Calculation View.  Right click on Calculation view > New > Calculation View. 2. Enter CE_PLAN_ACTUAL_02 for the name of the Calculation view. Select SQL Script for the type and be sure to select your assigned Schema. Click Finish. 3. The following screen opens. 4. In the left side of the diagram double click on the Script Node. Before entering code into the middle section click on the structure icon within the Outputs section in the right side of the screen.
  • 52. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 52 5. Enter all the output fields according including the corresponding Data Type and Length. HINT: You can find the complete list of fields and data types at the end of this section. 6. Refer to the Appendix and copy all the SQL code statements and past it between the BEGIN & END section replacing the “var_out = ...” code. 7. The completed SQL Script. Remember to replace student00 with your assigned number. Save your work.
  • 53. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 53 8. Click on the Output Node in the Scenario on the left hand side. Within the Script View details select all the Attributes > Right Click > Add as Attribute to move the fields into the outputs over to the right hand side of the screen. Proceed to do the same for the measures. 9. Save your work. 10. Activate and Preview.
  • 54. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 54 Optional Modelling Exercise 2 (Calculated Attributes) 1. Open the Attribute View LOCATION_00 to add an additional field ERDAT.  Right click on view > Open. 2. Enter LOCATION_01. Make a copy of the existing LOCATION_00 Attribute view within your assigned package. 3. Right click on KNA > Content.
  • 55. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 55 4. Find the ERDAT field, the field is made up of the year, month and day. Within your calculated attribute you will only display the year. 5. Close the Data preview. 6. Right Click on KNA1.ERDAT > Add as Attribute. 7. Within the Output section on the right of the screen. Right Click on Calculated Attributes > New
  • 56. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 56 8. Create a new Calculated Attribute called YEAR. Select NVARCHAR(4) as the data type. Within the expression editor either copy the following code or drag/drop/double click the elements or functions to copy them into the expression editor. midstr(string("ERDAT"),strlen(string("ERDAT"))-9,4) 9. When done Click Add. 10. The completed Output structure should look as follows. 11. We are only interested in the YEAR field. Proceed to hide the ERDAT field. Click on the ERDAT attribute > in the Properties change the Hidden attribute to True.
  • 57. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 57 12. Activate & Preview the view. 13. Remember to Activate any analytical views and calculation views that use this modified Attribute view. HINT: If you do not see any Calculated Attributes in the preview make sure to change the parameter within your Preferences.
  • 58. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 58 Optional Modelling Exercise 3 (Procedures) 1. Create a new Procedure that you can call from within a Calculation View.  Right click on Procedures > New > Procedure.. 2. Enter the function name; select the Database Schema where the tables are located. Click Finish. 3. Find the Input Pane on the right hand side and define the input parameters of Procedure. Right Click on Input Parameters > new Scalar Parameter
  • 59. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 59 4. Define 2 scalar input parameters, IN_PERIO_FROM & IN_PERIO_TO both VARCHAR 7. 5. Create a new Input Table Type parameter structure. Right Click on Input Parameters > New .. 6. Name the table type output structure STRIPDECIN_TT. Add the following fields ... PERIO NVARCHAR (7) VVGRW DECIMAL(15,3) VV010 DECIMAL (15,3) 7. Define the output Parameter structure of the function. Right click on Output Parameters > New ...
  • 60. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 60 8. Name the table type output structure STRIPDEC_TT. Add the following fields ... PERIO NVARCHAR (7) VVGRW DECIMAL(15,3) VV010 DECIMAL (15,3) 9. When done Click Ok. 10. The completed Input and Output Parameters should look as follows. 11. Add the following SQL statement to the Script View in the middle of the screen; you can copy the code from Appendix. Note: Pay attention to the naming of the variables, field names input and output parameters – they have to be the same as define in the input and output parameters.
  • 61. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 61 12. Save & Activate the Procedure Calling a procedure example from within a Calculation View. CALL <PROCEDURE> <OUPUT_PARAM(0-N), INPUT_PARAM(O-N> HINT: You can test procedures from within the SQL Editor by passing in null for the output structures. Add 2 single quotes for Scalar string values
  • 62. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 62 Optional Modelling Exercise 4.1 – (Time based Attribute View) 1. Open the Quick Launch Page  From the Help Menu > Quick Launch. 2. Click on Generate Time Data underneath Data. 3. Select Gregorian as the Calendar Type. 4. Enter 2007 to 2008 5. Select DAY for the Granularity 6. Click Generate. (Note: Depending on your authorization privileges you might need more rights to generate data) 7. Check the Generated data within the table _SYS_BI.M_TIME_DIMENSION. There should be an entry for every DAY between 2007 and 2008.
  • 63. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 63 8. Create a new Gregorian Time based Attribute view  Right Click on Attribute View > New > Attribute View. 9. Enter TIME_00 for the name of the view  Select Time  Gregorian.  For the Granularity select Date  Click on Auto Create.  Click Finish. 10. As a result you will see the Dimensions table with the generated Attributes. Optionally you can remove any attribute fields that are not needed.
  • 64. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 64 11. Right Click on the Attribute View > Activate. 12. Right Click on the Attribute View > Preview. 13. Use the Attribute view within a newly created Analytical View.  Right Click on Analytical Views > New > Analytical View.
  • 65. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 65 14. Enter CET1_00 and copy the COPA Actual Analytical view. 15. Select Copy From > Browse > studentXX.CEA1_00 16. Click Finish. 17. Add HZDAT as an Attribute. Right click on HZDAT > Add As Attribute. 18. Open the Logical View of the
  • 66. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 66 19. Create a Referencial (n ..1) join between TIME_00.DATE_SAP and Data Foundation HZDAT field. 20. Activate & Preview.
  • 67. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 67 Optional Modelling Exercise 4.2 – (Fiscal year Time based Attribute View) 1. Generate the master data from the specific time frame that you are interested in  On the Quick Launch Page > Data > Generate Time Data. 2. Verify the generated data within _SYS_BI.M_FISICAL_CALENDAR 3. Create a new Fiscal Time based Attribute view  Right Click on Attribute View > New > Attribute View.
  • 68. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 68 4. Enter FISCAL_00 for the name of the view  For the Calendar Type Select  Fiscal.  For the variant select K4:800  Click on Auto Create.  Click Finish. 5. As a result you will see the fiscal calendar table with the generated Attributes. Optionally you can remove any attribute fields that are not needed.
  • 69. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 69 6. Right Click on the Attribute View > Activate. 7. Right Click on the Attribute View > Preview. 8. Use the Attribute view within a existing Analytical View CET1_00.  Right Click on Analytical View > Open.
  • 70. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 70 9. Open the logical view. 10. Drag the FISICAL_00 attribute view into the Analytical views logical view. 11. Create a join (referential n..1) between FISCAL_00.DATE and the data foundation HZDAT field.
  • 71. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 71 12. Activate & Preview.
  • 72. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 72 Export a Model 13. Based on what you‟ve learned thus far, create a new attribute view under your package.  For the purposes of this exercise make the view simple, one table, no joins, etc.  Name your view Dummyxx, where xx represents your assigned number 14. Export your attribute view.  Select File Export. OR  From the Quick Launch screen, under Content, Select  EXPORT
  • 73. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 73 15. Select an Information Model to Export and click NEXT 16. Select the source system you would like to export from, Click NEXT.
  • 74. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 74 17. Highlight the Attribute View, Dummyxx, click ADD  Enter the target location for the Export.  Click FINISH HINT: Use the path to the desktop. The process will create a folder on the desktop. The name of the folder should be the same name as the system you are logged into. Within the folder you will find your new exported file.  The status of the export in the deployment log should say “Success”.  If you double click on the log entry you can see the details of the job 18. Navigate to the location of the file  Open the file to ensure the XML is there.  Congratulations, you‟ve exported your first file!
  • 75. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 75 5.6 Import a Model 19. Now that the export was successful, import the xml file that was created during the export to the RKT system under your own package.  Select File  IMPORT OR  From the Quick Launch view, under CONTENT, Select IMPORT
  • 76. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 76 20. Select an import source  Information Models, Click > NEXT 21. Select the system to import to and Click NEXT
  • 77. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 77 22. Navigate to the file location, Select the view to import, click ADD and then select FINISH 23. Look at the Deployment Log status of the import.  It appears the import of the attribute view failed.  The reason for the failure is the view already existed.  Delete the view from your package and re-import.  Confirm the status in the deployment log is Success
  • 78. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 78 Lesson 5: Reporting This section includes exercises on various BI client tools: Microsoft Excel, SAP BusinessObjects Analysis, Explorer, Dashboards, Web Intelligence and SAP Crystal Reports 2011. After completing this lesson, you will be able to  Understand reporting options via ODBO, ODBC and JDBC  Execute reports via select reporting applications (Excel, Crystal Reports) via these interfaces  Describe the basics of configuring these connections.  Understand reporting via and connectivity options from SAP Business Intelligence 4.0 5.1 Advanced Analysis, Office edition using a local ODBC connection Introduction A pre-release version of Advanced Analysis, Office edition (AAO) has been installed on the training system. In this exercise you will use AAO to connect to HANA through a locally defined ODBC connection. The ODBC connection has already been configured by the administrator and the information that follows is for your information only. This exercise is using Microsoft Excel 2007 which is a 32-bit application; therefore we will be using the 32-bit ODBC client driver. The ODBC DSN was created with the 32-bit ODBC Administrator tool. Although AAO uses an ODBC connection and protocol, it is internally the SAP proprietary BICS object model to process request to and responses from the IMDB server. Exercise Steps 1. Start AAO from the Start Menu: a. Start Menu b. Programs c. SAP BusinessObjects
  • 79. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 79 d. Analysis for Microsoft Excel 2. Start the “Select Data Source” wizard: 3. In order to use a local ODBC connection (instead of authenticating against BOE and using a relational DB connection published to CMC), click “skip” in the wizard:
  • 80. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 80 4. Select the ODBC connection named “HANA HDB”, click “Next” 5. Enter your HANA user name and password, click “OK”:
  • 81. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 81 6. Find and expand your package (studentXX), select one of the views you have created, click “OK” 7. A report based on that view is shown. 8. Drag and drop dimensions and measures in the rows and columns to navigate in that view and build your report
  • 82. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 82 To filter members or measures, right click on the row or column item
  • 83. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 83 5.2 Microsoft Excel Pivot Tables (ODBO/MDX access) This exercise focuses on the basics of Excel Pivot Table access to HANA data. Excel Pivot Table access is provided via a native ODBO (OLE DB for OLAP). The ODBO client driver allows any ODBO-enabled client to report off HANA via MDX queries. Excel 2007 is one example of such client application. 1. Initiate the Excel Data Connection Wizard  Click on the DATA menu  Select “From Other Sources”  Select “From Data Connection Wizard”  Result: “Data Connection Wizard” launches 2. Select Other/Advanced drivers then click “NEXT”
  • 84. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 84 3. Select “SAP NewDB MDX Provider” (Naming as of RKT delivery time) Click “Next” (do not click “OK” and do not double-click “SAP NewDB MDX Provider” 4. Enter system logon info provided by your instructor.
  • 85. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 85 5. Select a cube (analytic or calculation view) from the “database” selection.  Select studentxx from the dropdown (student00 if there are none of your own)  Select “CE_PLAN_ACTUAL_00”  Click NEXT 6. Accept the proposed file name for storing the data connection.  Enable “Save password in file” (Saving password is a recommended setting for this RKT exercise)  Carefully read the confirmation dialog : click “Yes” in the confirmation dialog  Click “Finish” in the Data Connection Wizard 7. To open the connection, simply accept the proposed Pivot Table report properties
  • 86. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 86 8. An empty Pivot Table should appear, and the list of fields available from the right panel “PivotTable Field List” 9. Select fields from the right panel and drag and drop them onto the row, column and data items areas of the PivotTable
  • 87. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 87 5.3 Create a JDBC Connection onto the SAP BusinessObjects BI 4.0 server This exercise is a preparation to the following exercises and the starting point for reporting on HANA from the SAP BusinessObjects BI 4.0 platform. You will you use “Information Design Tool” to create a relational DB connection into HANA, using the JDBC middleware driver for HANA. In order to start Information Design tool, follow the menu path shown in the screenshot below: - Start Menu - Programs - SAP BusinessObjects Enterprise XI 4.0 - SAP BusinessObjects Enterprise Client Tools - Information Design Tool
  • 88. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 88 1. Create a new Project 2. Name the project (and accept the proposed project location) 3. Right-click the newly created project and select “New -> Relational Connection
  • 89. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 89 4. Name the connection and click Next 5. As database driver, select “SAP -> SAP High-Performance Analytic Appliance (SAP HANA) 1.0 -> JDBC Drivers” Click Next
  • 90. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 90 6. Keep the Authentication Mode set to “Use specified username and password” Note: on an environment where each user must present his own credentials to HANA because of user-level privileges, one would select “Use BusinessObjects credential mapping”. Refer to the User Management lesson for details. Enter your HANA user name (STUDENTXX) and the password as provided by the instructor Enter the server connection string as follows : <hostname>:<port number> Note: The hostname and port number will be given to you by the instructor. The port should be a 5 digit number that follows this pattern: 3xx15 where xx is the instance number. Test the connection, if the connection test is successful, click “Next” 7. Change the Connection Pool Mode to “Disconnect after each transaction” Leave the others parameters to their default values Click on “Finish”
  • 91. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 91 8. From the project folder, select the connection you just created. Right-click and select “Publish Connection to a Repository” 9. Log on to the BI 4 using the connection information provided by the instructor System: <hostname>:<port number> Username: Password: Authentication: Enterprise Click on “Connect”
  • 92. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 92 10. Keep the default folder “Connections” as the destination folder and click on “Finish” 11. You should be asked whether you want to create a shortcut to the newly published connection. Click “Yes” Click “Close” Your JDBC enabled Connection to HANA is now defined on the BI 4 system and available to BI front end tools like SAP BusinessObjects Explorer.
  • 93. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 93 5.4 SAP BusinessObjects Explorer In Internet Explorer, connect to SAP Business Objects Explorer on the BI 4 system. Use the connection details provided by the instructor, the URL should look like this: http://<hostname>:<portnumber>/explorer Log on using the credentials provided by the instructor: Language: English (United States) System: <hostname>:<port number> User: STUDENTXX Password: training Authentication: Enterprise 1. Click “Manage Spaces”: 2. Expand “SAP High-Performance Analytic Appliance (SAP HANA) 1.0” Expand the Connection you created and published in the previous exercise “RC_STUDENTXX” Select the Calculation View “studentXX/CE_PLAN_ACTUAL_00”
  • 94. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 94 3. Click on “New” to create a new Information Space on this calculation view. 4. From the Properties tab, enter a name “STUDENTXX_INFOSPACE”, check the option “Show on Home page”, and select the Public Folder “HANA RKT”
  • 95. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 95 Go to the next tab “Objects”, add dimensions and measures to the Information Space by double clicking (or drag and drop) on the objects listed in the left pane. Click “OK” when your selection is made.
  • 96. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 96 5. “Index” your newly created information space: Once the indexing completed, a green tick icon should appear in the status column. 6. From the top menu bar, go back to the “Home” tab 7. And refresh the list of information spaces available from the “Home” page : 8. Open the information space you have just created: 9. You are now ready to explore your data set
  • 97. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 97 5.5 Create a Universe In this exercise you use “Information Design Tool” to - re-use the project and connection to HANA already defined earlier - create a data foundation using that connection - create a business layer based on the data foundation - publish the universe to the BI 4.0 system In order to start Information Design tool, follow the menu path shown in the screenshot below: - Start Menu - Programs - SAP BusinessObjects Enterprise XI 4.0 - SAP BusinessObjects Enterprise Client Tools - Information Design Tool
  • 98. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 98 12. Create a new Data Foundation within your project (created in exercise 6.3)
  • 99. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 99 13. Name the Data Foundation 14. Choose type “Single Source”
  • 100. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 100 15. Select the secured connection you have previously created. It should have a file extension .cns Click “Finish” 16. If prompted to re-open a session onto the BI 4 system, enter your credentials provided by the instructor
  • 101. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 101 17. Browse the list of Schemas to find the “_SYS_BIC” schema
  • 102. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 102 18. Within that schema, identify the calculation views you created earlier. They should appear as tables named studentxx/CE_PLAN_ACTUAL_00 studentxx/CE_PLAN_ACTUAL_02 studentxx/CE_PLAN_ACTUAL_04 19. Drag studentxx/CE_PLAN_ACTUAL_00 into the “Master” area of the screen. 20. Check that the connectivity works: right click on the table and select the option “Show Table Values...”
  • 103. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 103 21. A new tab should open and the data retrieved from HANA (first 200 rows by default) 22. Go back to the Data Foundation tab 23. Save the Data Foundation 24. Create a new Business Layer 25. Enter a name “ BL_STUDENTXX” and click “Next”
  • 104. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 104 26. Select type “Relational Business Layer” 27. Select the Data Foundation you have created in the previous step. Then click “Finish”
  • 105. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 105 28. By default all fields are defined as dimensions. Select the fields to turn into measures, right click and select the menu option “Turn into measure(s)” 29. For each measure, edit the “Select” statement and add a SUM aggregation function to it Example: the SQL Select statement of the Cm1 object will be defined as SUM("_SYS_BIC"."student00/CE_PLAN_ACTUAL_0 0"."CM1") 30. Save the business layer 31. We will now enrich the universe with a list of values and parameter that will be reusable from the BI Client tools. Go to the “Parameters and List of Values” pane
  • 106. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 106 32. Click on Insert a List of Values and select the option “List of Values based on business layer objects” 33. Enter a name for this new list of values “Distinct Regions” Click on “Edit Query” 34. Select the object “Regio” as a result object and click on “View Script”
  • 107. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 107 35. Click on “Use Custom Query Script” Go to the Query Script section where the SQL Statement is defined Add “DISTINCT” right after the SELECT clause. This will allow us to only retrieve distinct values for all the regions listed in our calculation view Click OK And click OK again 36. You should be back to the business layer definition screen. You may validate your list of values by clicking on the “preview” button 37. Click on the Insert Parameter icon to create a new parameter 38. Enter a name “Distinct Region Selection” Leave all options to the default values Enter a Prompt text that will be displayed to end users “Select a region from the list” 39. Point the list of values option to the list of values “Distinct Regions” we created in the previous step of this exercise
  • 108. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 108 40. The next steps will create a test query to validate a few objects of the universe. Go to the “Queries” pane to create a test query Click on the “Insert query” icon 41. The query panel appears: you can select dimension and measure objects like end users would do from a BI Client application. Drag and drop the objects Ort01, Matnr, CM1 and CM2 into the Result Objects area Drag and drop the object Landx into the Query Filter area
  • 109. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 109 42. From the Query Filter area, select the operator “In List”, and the option “LOV” 43. Select the values US, MX and CA from the list of values Click “OK” 44. Click on the “Refresh” button from the Partial Results area. The first 200 rows of the result set should display in the Partial Results area The test query executes fine. The universe is now ready to be published on to the BI 4.0 system.
  • 110. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 110 45. Save the Business Layer From the project folder, right click on the business layer file and select the option “Publish / To a Repository...” 46. IDT will prompt you to do a Integrity Check, first. Select “Check All” to select all options to be checked Click on “Check Integrity” 47. This operation may take a few minutes depending on the complexity of the universe. For the purpose of this training, you can ignore the warning messages on lack of primary keys. Click “Next”
  • 111. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 111 48. Keep the default selected folder and click on “Finish” to publish the universe onto the BI 4.0 system 49. The universe is now published and ready to be consumed by BI Clients like Web Intelligence, Dashboards or Crystal Reports for Enterprise
  • 112. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 112 5.6 Dashboards (Xcelsius) You will now create a dashboard with SAP BusinessObjects Dashboard Design Tool that consumes the Universe you created earlier. 1. Open SAP BusinessObjects Dashboard Design Tool from the Start menu : Start Programs Dashboard Design Dashboard Design 2. If prompted by a warning message on Live Office compatibility, click “Yes” 3. From the Home page, click on “OPEN / Dashboard Design Object from Platform...” 4. Enter your BI 4 credentials provided by the instructor
  • 113. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 113 5. Browse the Public Folders and expand the folder “HANA RKT” to select the Dashboard “Dashboard Template” 6. The dashboard opens and should look like the following :
  • 114. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 114 7. From the Query Browser panel, click on “Add Query” 8. You will now see a list of universes defined on your BI 4.0 system. Expand the folder Universes and find the universe you published earlier “BL_STUDENTXX.unx” 9. Click on “Next”. You will see the same query panel you worked with in previous exercises. Select the result objects Ort01, Cm1 and Cm2. Select a filter object Regio with an operator “Equal To” and a value set to “Prompt”.
  • 115. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 115 10. To define the prompt, select the option “Use Universe Prompts”, select the object “Distinct Region Selectoin” and click “OK” 11. Click “Next” on the Query Panel 12. The next screen will give you a preview of the result set returned by the query. Select a value from the list of values and click on “Run”
  • 116. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 116 13. Verify the result set is correct and click “Next” 14. Leave all options to the default values and click “OK” on the following screen
  • 117. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 117 15. The query now appears in the query browser pane 16. From the canvas, select the chart “Geography Analysis” and display its properties (right click / properties). Select the “Series1” entry from the list, and map the Values(X) field to “Query Data”. 17. A pop up window is displays and lists the result objects from the query. Select the measure Cm1 as the measure for the Series1 of this chart.
  • 118. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 118 18. Repeat the same steps with “Series2” and select Cm2. 19. Select Query Data for the Category Labels(Y) field, and select the dimension Ort01 20. The bar chart should now display values for the two series you defined.
  • 119. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 119 21. We will now map the prompt selector component to the filter object defined in the query. Display the properties of the prompt selector 22. From the properties pane, set the “Source Prompt” property to “Query 1: Distinct Region Selection:” 23. The dashboard is now ready to be published onto the BI 4.0 system and viewed by end users. Click on File / Save to Platform As / Dashboard Design Object
  • 120. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 120 24. Select the Public Folder “HANA RKT”, enter a name “STUDENTXX_DASHBOARD” and click on Save 25. Open a web browser and connect to BI Launch Pad, the URL should look like this (exact URL will be provided by the instructor): http://<hostname>:<port>/BOE/BI 26. Log on to BI Launch Pad with the credentials provided by the instructor: System: <hostname>:<port> Username: STUDENTXX Password: ******
  • 121. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 121 27. From the Home Page, go to the “Documents” tab 28. Go to the Public Folder “HANA RKT” and double click (or right click / View) on the dashboard you just published “STUDENTXX_DASHBOARD”
  • 122. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 122 29. The dashboard should open in a separate tab. Select different values from the list (prompt selector) and observe the bar chart being refreshed with live data from the HANA system.
  • 123. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 123 5.7 Crystal Reports 2011 using JDBC Introduction This example shows how to report off HANA via a JDBC-enabled connectivity using Crystal Reports 2011. This connectivity provides a relational access to HANA with SQL queries. The information that follows is for your information only, the JDBC driver is already installed and configured with Crystal Reports on the training system. The JDBC configuration for Crystal Reports is done in the configuration file CRConfig.xml. For Crystal Reports 2011, this file is located at: <install folder>SAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java The first parameter to modify is “classpath” in order for Crystal Reports 2011 to load the JDBC driver for HANA. On a Windows machine, the default path to the JDBC driver file is C:Program Filessaphdbclient The text in bold has been added to the default configuration: … <Javaserver-configuration> <DataDriverCommon> <JavaDir32>… <JavaDir64>… <Classpath>C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/crlovmanifest.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/CRLOVExternal.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/CRDBJDBCServer.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/CRDBXMLServer.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/CRDBJavaBeansServer.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/external/log4j.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/CRDBSForceServer.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/external/CRDBSForceExternal.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/CRDBWicServer.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/external/CRDBWicExternal.jar;C:Program FilesSAP BusinessObjectsSAP BusinessObjects Enterprise XI 4.0java/lib/external/CRDBXMLExternal.jar;C:Program FilesSAPhdbclientngdbc.jar;${CLASSPATH}</Classpath> … The second set of parameters to set is the JDBC driver itself: connection string to the HANA server and main class of the JDBC driver. The connection string follows the following pattern: jdbc:sap://<IMDB_host>:<IMDB_port> where <IMDB_port> is the IMDB port number which follows the following pattern : 3xx15 and xx is the instance number. The main class of the JDBC driver is always defined as : com.sap.db.jdbc.Driver The text in bold has been added to the default configuration: ... <JDBC> <CacheRowSetSize>100</CacheRowSetSize> <JDBCURL>jdbc:sap://lt0062.wdf.sap.corp:30215</JDBCURL> <JDBCClassName>com.sap.db.jdbc.Driver</JDBCClassName> ... Exercise Steps
  • 124. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 124 1. Start Crystal Reports 2011 If prompted by a license evaluation related message, click OK. 2. Click on “Blank Report” from the Start page under “Create a new Report”
  • 125. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 125 3. A blank report should appear and the “Database Expert” window should come up. If not, select the menu option “Database / Database Expert...” Double click on “JDBC (JNDI)” A new window comes up and presents the connection string to the HANA server that was pre-configured in the CRConfig.xml file. 4. Enter the Database name as the HANA System ID provided by your instructor. Enter your credentials to the HANA server that were provided by the instructor : STUDENTXX / training
  • 126. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 126 5. Select a table from the list of tables, add it to the selected tables column, click “OK” For example, select the table SYSTEM.CE1IDEA 6. From the top menu, select “View / Field Explorer”. This will display the list of tables and fields available to your report.
  • 127. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 127 7. Select Fields for your report.  Expand the table on the right in Field Explorer.  Select a few and drag into DETAILS section of the report. 8. From the Preview menu, select Preview Sample.  Limit results to first 100 rows for initial run 9. View results  Try reformatting the data, sorting, totalling etc.
  • 128. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 128 5.8 Crystal Reports 2011 using ODBC Introduction This exercise is very similar to the previous exercise; you will use Crystal Reports 2011 to report off HANA in a relational manner (via SDL queries). You will, however, use an ODBC data connection (and ODBC client driver) to HANA instead of JDBC. Note that from an end-user perspective there is no significant functional difference between ODBC and JDBC. The ODBC connection on the training system was configured by an administrator and the information that follows is for your information only. Crystal Reports 2011 is a 32-bit application and will use the 32-bit version of the ODBC driver for HANA. The ODBC DSN entry was created from the 32-bit ODBC administrator tool which, on a 64-bit machine, can be found at : <windows install dir>sysWow64odbcad32.exe
  • 129. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 129 Add a new DSN (Data Source Name)  Switch to user or system DSN tab.  Click ADD  Select HDBODBC32  Click Finish 10. Configure the DSN  Click the Configure button  Add Server information  Note that the “Database” entry should be the SID of your HANA system
  • 130. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 130 Exercise Steps 1. Start Crystal Reports 2011 If prompted by a license evaluation related message, click OK. 2. Click on “Blank Report” from the Start page under “Create a new Report”
  • 131. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 131 3. A blank report should appear and the “Database Expert” window should come up. If not, select the menu option “Database / Database Expert...” Double click on “ODBC (RDO)” 4. Select the DSN “HANA HDB” (same entry that was used in the Analysis Office exercise). Click “Next” 5. Enter your credentials to the HANA server that were provided by the instructor : STUDENTXX / training
  • 132. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 132 6. Select a table from the list of tables, add it to the selected tables column, click “OK” For example, select the table SYSTEM.CE1IDEA 7. From the top menu, select “View / Field Explorer”. This will display the list of tables and fields available to your report.
  • 133. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 133 8. Select Fields for your report.  Expand the table on the right in Field Explorer.  Select a few and drag into DETAILS section of the report. 9. From the Preview menu, select Preview Sample.  Limit results to first 100 rows for initial run 10. View results  Try reformatting the data, sorting, totalling etc.
  • 134. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 134 Exercise for Lesson 6 – User Management and Security Goal: This lesson will demonstrate which minimum set of privileges a user needs in order to read data from one particular data model in HANA. You will find a “reporting” user named “TESTXX” (XX being your group number) which you will supply with sufficient privileges to read data from the data model you have created earlier. In this Exercise you will do the following tasks: - Add Package Privileges to user TESTXX  these will allow browsing the list of packages and seeing the views inside of the packages  it is only needed for preview from inside of HANA Studio. The privilege is not required for using other reporting tools.  for simplicity, we collected all require package privileges into one role. - Add SQL privileges to user TESTXX - Create an Analytic Privilege based on one of the Analytic Views you created - Create an Analytic Privilege based on one of the Attribute Views you created - Assign these Analytic Privileges to user TESTXX - Verify that the security concept works as described. Part 1: Add user “TESTXX” to your SAP HANA Studio: 1. Right-click the entry for System GBS in the Navigator tree Choose “Add Additional User” 2. Enter user name “TEST00” Password Klick “Finish”
  • 135. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 135 3. Enter and confirm the new password Suggestion: 4. Right-click the new entry for System GBS and user TestXX in the Navigator tree Choose “Refresh” from the context menu This will update the system status in your Navigator tree. Part 2: Check the Privileges assigned to user TESTXX 5. Open the user editor for user TESTXX Work as user STUDENTXX Navigate to the following path: HDB (STUDENTXX)  Default Catalog  Authorization  Users Either: Right-click user TESTXX and choose “Open” Or: double-click user TESTXX
  • 136. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 136 6. Check all tabs for the different types of privileges (Granted Roles, SQL Privileges, Analytic Privileges, System Privileges and Package Privileges Verify that the only granted privilege is role “PUBLIC” 7. In the user editor for user TESTXX, set the “Session Client” field to “800” In our ERP tables, the client is 800. If you have the default client for your data models set to “dynamic”, the Session Client from your user profile will be substituted at query run time. 8. Save the user profile: Either click the “Save” icon Or hit “Ctrl+s” We will continue using this user editor for user TESTXX, so do not close it. Part 3: Verify that the user cannot view your Analytic Views or the Calculation View you have created: 9. Work as user TESTXX Try navigating to the following path HDB (TESTXX)  Content  studentxx  Analytic Views On trying to expand folder “Content” you should receive an error message as shown on the right. This is because access to the content tree (design time versions of Information Models) is restricted by Package Privileges. User TESTXX does not have any Package Privileges assigned.
  • 137. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 137 Part 4: Add Package Privileges to user TESTXX 10. Switch to the user editor for user TESTXX Verify that the user who opened the dialog is your user STUDENTXX Within the editor, switch to tab “Granted Roles” 11. We created a predefined role that contains all privileges needed to browse the Content Tree and allow you to attempt a preview. Click the green -icon to add a new role to user TESTXX. In the search dialog, start typing “REPO_ADMIN”. Once the “Search-as-you-type” finds the desired role, highlight role “REPO_ADMIN” in the list of “Matching items”, then click “OK” 12. Save the user profile: Either click the “Save” icon Or hit “Ctrl+s” We will continue using this user editor for user TESTXX, so do not close it.
  • 138. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 138 Part 5: Verify that the user cannot view your analytic views nor the calculation view you have created: 13. Work as user TESTXX Right-click the Content-folder Select “Refresh” from the context menu. This should now show the list of all packages in the system. 14. Work as user TESTXX Navigate to the following path HDB (TESTXX)  Content  studentxx  Analytic Views Right-click the Analytic View “CEA1_XX” Select “Data Preview” from the context menu. (You may do the same for the other Analytic Views or for the Calculation view) 15. Data preview should give you an error message as in the screenshot to the right. The reason for this message is that the user is missing SQL privileges to access the runtime object of the Analytic View. The runtime object of the Analytic View is the “Consumption Column View” created in Schema _SYS_BIC. That view is named: _SYS_BIC.<package>/<view> Part 6: Add SQL Privileges to the user There are two ways to grant the SQL Privilege for accessing run-time objects of Information Models. The first way is to use the user editor; the second one is to explicitly run a stored procedure for this purpose. In this part of the exercise we grant the privilege via the user editor. The stored procedure will be demonstrated later.
  • 139. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 139 16. Again make sure the user editor for user TESTXX is opened by user STUDENTXX. Switch to tab “SQL Privileges”. Click the -icon 17. In the search window, start typing “studentXX/CEA1_XX” (where both occurences of XX must be replaced by your group number). Hint: including the package name in the search will greatly help you find the required view (compared to only trying to search for “CEA1_XX” Select the appropriate cube from the list of “Matching items”. Click “OK”. 18. Now you have selected the object for which you want to grant SQL privileges, you also have to choose what privilege to grant. For reading from an object, we need to grant the SELECT-privilege. Highlight the SQL Object “studentXX/CEA1_XX” Activate the check box for the “SELECT”-Privilege. 19. Repeat the same for Analytic View CEP1_XX. You may try adding the Calcuation View; however, the search dialog typically does not find it… In the next step, we will use an SQL command to add this privilege to user TESTXX.
  • 140. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 140 20. Save the user profile: Either click the “Save” icon Or hit “Ctrl+s” We will continue using this user editor for user TESTXX, so do not close it. Part 7: Add the SELECT privilege for the Calculation View 21. Work as user STUDENTXX Highlight the system entry for “GBS (STUDENTXX)” In the Navigator tree. Click the Icon for the SQL editor 22. In the SQL editor, type the following command (replacing XX by your team number): CALL SYSTEM.GRANT_SELECT_ON_VIEW ( '_SYS_BIC."studentXX/CE_PLAN_ ACTUAL_XX"', 'TESTXX' ); Take care to set the quotes in exactly the correct way: Both parameters (the view name and the user name) have to be enclosed in single quotes. Within the view name, the schema name (_SYS_BIC) must not be enclosed in double quote, whereas the name of the object inside of the schema (here: studentXX/CE_PLAN_ACTUAL_XX) has to be enclosed in double quotes. Execute the statement by clicking the green arrow or hitting the “F8”-key. 23. Verify that user TESTXX has SQL SELECT PRIVILEGES for all three views. You have to re-open the user editor for user TESTXX in order to see the most recent state of the user profile.
  • 141. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 141 Part 8: Verify that the user still cannot read from the views 24. Work as user TESTXX Navigate to the following path HDB (TESTXX)  Content  studentxx  Analytic Views Right-click the Analytic View “CEA1_XX” Select “Data Preview” from the context menu. 25. Data preview should give you a different error message now, see the screenshot to the right. The reason for this message is the user has SQL access to the run time object, but is still missing an Analytic Privilege. You may test this for the other views as well. Part 9: Create an Analytic Privilege based on Analytic View CEA1_00 Please be very careful when working on this part. Analytic Privileges can presently only be activated once. If you need to change the Analytic Privilege after it has been successfully activated, you will have to delete it and re-create it from scratch. In the following we are going to grant Analytic Privileges to user TESTXX which will finally allow reporting off the Analytic and Calculation Views. We are restricting access to only Material Number „P-103‟. In this first step, we will define the restriction directly the MATNR-field of view CEA1_00. 26. Work as user STUDENTXX Navigate to the following path HDB (STUDENTXX)  Content  studentxx  Analytic Privileges Right-click the folder name “Analytic Privileges” Select “New”  “Analytic Privilege” from the context menu.
  • 142. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 142 27. In the creation wizard, type the name: AP_CEA1_P103_XX (replacing XX appropriately) Enter a description Click “Next” 28. In the second step of the wizard, select your view studentXX/CEA1_XX Highlight that view in the Content tree on the left. Click “Add”  this will add the view to the right-hand part of the display. Click “Finish”. 29. Implementing the privilege is now done in three steps: 1) Select further views for which this privilege should be valid (optional) We will not add further views in this step. 2) Select attributes on which a restriction shall be defined (All fields of all views selected in 1) will be offered) 3) Define value restrictions for the attributes selected in 2)
  • 143. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 143 30. Add the field “MATNR” to the list of “Associated Attributes Restrictions”. Click the corresponding “Add” button Select field “MATNR” from the presented field list Click “OK” 31. Define the value restriction for field “MATNR” Highlight the MATNR field under “Associated Attributes Restrictions” Click the “Add” button for “Assign Restrictions” (this increases the counter for the number of restrictions for MATNR) Click into the “Value” field in “Assign Restrictions”. Click the “…”-icon. In the search window, search for Material P-103 Select the material from the search list Click OK (Note: you could also have typed in the value directly, without opening the search window). 32. Save the Analytic Privilege: Either click the “Save” icon or hit “Ctrl+s”. Then activate the Analytic Privilege
  • 144. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 144 Part 10: Assign Analytic Privilege AP_CEA1_P103_XX to user TESTXX 33. For granting Analytic Privileges, there are two possibilities: via the User Editor in SAP HANA Studio; or via SQL statements. We first show how to use the User Editor: Work as user STUDENTXX Open the User Editor for user TESTXX In that Editor, switch to tab “Analytic Privileges” 34. Click the green “+”-icon In the search dialog, start typing “studentXX/AP_CEA1_P103_XX” (replacing XX appropriately) From the list of “Matching items”, select privilege “studentXX/AP_CEA1_P103_XX” Click “OK” 35. Save the user profile: Either click the “Save” icon Or hit “Ctrl+s”
  • 145. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 145 Part 11: Verify that the user can read from Analytic View CEA1_XX 36. Work as user TESTXX Navigate to the following path HDB (TESTXX)  Content  studentxx  Analytic Views Right-click the Analytic View “CEA1_XX” Select “Data Preview” from the context menu. 37. Data Preview should now return a list of 474 output values. Verify that the list contains only records with MATNR = P-103 You may verify that preview still does not work for Analytic View CEP1_XX nor for the Calculation View. Part 12: Create an Analytic Privilege based on Attribute View PRODUCT_XX Please be very careful when working on this part. Analytic Privileges can presently only be activated once. If you need to change the Analytic Privilege after it has been successfully activated, you will have to delete it and re-create it from scratch. 38. Finally, we define an Analytic Privilege that will allow reading from the second Analytic View and from the Calculation View. Work as user STUDENTXX Create a new Analytic Privilege inside of package studentXX Name this privilege AP_CEP1_P103_XX
  • 146. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 146 39. In the second step of the creation wizard, select the Plan Data Analytic View studentXX  CEP1_XX Click “Finish” 40. We want this privilege to also apply to the Calculation View CE_PLAN_ACTUAL_XX and to Attribute View PRODUCT_XX For the list of “Reference Models”, click the “Add” button Choose Calculation View: package studentXX view CE_PLAN_ACTUAL_XX And choose Attribute View package studentXX view PRODUCT_XX Click OK 41. In order to provide an Attribute Restriction on MATNR for the Analytic View, we can choose the corresponding field from Attribute View PRODUCT_XX: Click the “Add” button for “Associated Attribute Restrictions” Select view PRODUCT_XX (studentXX) Choose field MATNR of that view Click “OK”
  • 147. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 147 42. Assign the restriction value for field MATNR of the PRODUCT_XX Attribute View: Highlight Attribute PRODUCT_XX  MATNR in the list of “Associated Attribute Restrictions” Click “Add” in screen area “Assign Restrictions” Enter value “P-103” (directly or via the input dialog). At this point, we have defined a restriction based on the Attribute View which is also going to be applicable for the Analytic Views in the list of “Reference Models” – as long as these Attribute Views make use of the Attribute View. This restriction does not apply to the Calculation View – although the Calculation View is also in the list of reference models. We have to define an attribute restriction explicitly for a field from the Calculation View. This restriction can be added to the same Analytic Privilege. 43. So add an Attribute Restriction for field MATNR of the Calculation View Click the “Add” button for “Associated Attribute Restrictions” Select view CE_PLAN_ACTUAL_XX (studentXX) Choose field MATNR of that view Click “OK” 44. In order to provide an Attribute Restriction on MATNR for the Analytic View, we can choose the corresponding field from Attribute View PRODUCT_XX: Click the “Add” button for “Associated Attribute Restrictions” Select view PRODUCT_XX (studentXX) Choose field MATNR Click “OK” There is no need to define a restriction value for the Calculation View. The restriction to MATNR = P-103 is already enforced on the two Analytic Views. So we can assign a “wildcard” restriction on the Calculation View.
  • 148. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 148 “Wildcard” restrictions can be defined by just selecting a field, without assigning a restriction value. Thus, we are already finished building the Analytic Privilege. 45. Save the Analytic Privilege: Either click the “Save” icon or hit “Ctrl+s”. Then activate the Analytic Privilege Part 13: Assign Analytic Privilege AP_CEA1_P103_XX to user TESTXX 46. This time we are assigning the Analytic Privilege using SQL statements: Work as user STUDENTXX Highlight the system entry for “GBS (STUDENTXX)” In the Navigator tree. Click the Icon for the SQL editor 47. In the SQL editor, enter the following statement: CALL SYSTEM.GRANT_ANALYTIC_PRIVILE GE ( '"studentXX/AP_CEP1_P103_XX"' , 'TESTXX' ); Take care to replace all three occurrences of XX appropriately. Execute the statement by clicking the green arrow or hitting the “F8”-key.
  • 149. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 149 Part 14: Verify that the user can read from all Views 48. Work as user TESTXX Navigate to the following path HDB (TESTXX)  Content  studentxx  Analytic Views Right-click the Analytic View “CEA1_XX” Select “Data Preview” from the context menu. (and accordingly for Analytic View CEP1_XX and for Calculation View CE_PLAN_ACTUAL_XX) 49. Data Preview should now return a list of output values. Verify that the list contains only records with MATNR = P-103 The number of records to expect is: CEA1_XX  474 records CEP1_XX  130 records CE_PLAN_ACTUAL_XX  604 records Prerequisite: Create stored procedure wrappers The following is not an exercise. Is it for information only. Stored procedures are required in order to grant Analytic Privileges and in order to grant the SELECT Privilege on the run time objects of Information Models (Consumption Column Views). These stored procedures cannot be executed directly from the SQL editor of SAP HANA Studio. It is possible to wrap the procedures into SQL Script Procedures. For reference, we list here the SQL statements for creating the wrapper procedures employed in the above examples. There are four stored procedures: - GRANT_PRIVILEGE_ON_ACTIVATED_CONTENT - REVOKE_PRIVILEGE_ON_ACTIVATED_CONTENT - GRANT_ACTIVATED_ANALYTICAL_PRIVILEGE - REVOKE_ACTIVATED_ANALYTICAL_PRIVILEGE We wrap these into the following four SQL Script Procedures: - GRANT_SELECT_ON_VIEW - REVOKE_SELECT_ON_VIEW - GRANT_ANALYTIC_PRIVILEGE - REVOKE_ANALYTIC_PRIVILEGE The SQL Script statements for creating these four wrapper functions are:
  • 150. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 150 GRANT_SELECT_ON_VIEW create procedure GRANT_SELECT_ON_VIEW ( in i2 varchar(256), in i3 varchar(256) ) language sqlscript as begin call GRANT_PRIVILEGE_ON_ACTIVATED_CONTENT('SELECT', @i2@, @i3@); end; REVOKE_SELECT_ON_VIEW create procedure REVOKE_SELECT_ON_VIEW ( in i2 varchar(256), in i3 varchar(256) ) language sqlscript as begin call REVOKE_PRIVILEGE_ON_ACTIVATED_CONTENT('SELECT', @i2@, @i3@); end; GRANT_ANALYTIC_PRIVILEGE create procedure GRANT_ANALYTIC_PRIVILEGE ( in i1 varchar(256), in i2 varchar(256) ) language sqlscript as begin call GRANT_ACTIVATED_ANALYTICAL_PRIVILEGE (@i1@, @i2@); end; REVOKE_ANALYTIC_PRIVILEGE create procedure REVOKE_ANALYTIC_PRIVILEGE ( in i1 varchar(256), in i2 varchar(256) ) language sqlscript as begin call REVOKE_ACTIVATED_ANALYTICAL_PRIVILEGE (@i1@, @i2@); end;
  • 151. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 151 Lesson 7: Data Provisioning This section includes an exercise on Data Services. 7.1 Exercise: Data Services 7.1.1 Create an SAP Datastore in SAP BusinessObjects Data Services 1. Open SAP BusinessObjects Data Services Designer  Start -> Data Services Designer  Start -> All Programs -> SAP BusinessObjects 4.0 -> SAP BusinessObjects Data Services 2. Logon to the SAP BusinessObjects Data Services Repository by entering the following information and clicking on Log On.  System – verigtech11:6400  User name – STUDENTXX  Password – training  Authentication - Enterprise
  • 152. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 152 3. Select your repository (STUDENTXX) and click OK. 4. Click on the Datastore tab in the lower left-hand corner of the window. 5. Right-click in the empty window and click on New.
  • 153. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 153 6. Enter the following...  Datastore name – DS_ECC  Datastore type – SAP Applications  Application server – ibmcoe1lp23  User name – RKT_USER  Password – training 7. Click on Advanced and enter the following...  System number – 01. 8. Click OK. This is what you will see in the Datastore tab once your SAP Application Datastore has been created. You will come back to this later in the exercise.
  • 154. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 154 7.1.2 Import SAP ERP Metadata into the SAP HANA Database Before importing metadata into the SAP HANA Database, you must verify the connection settings to your SAP BusinessObjects Data Services instance. Please note that the Import Server settings are specific to a single HANA server instance.  Navigate to the Information Modeler perspective and open the Quick Launch view  Click on the Manage Connections... button and connect to the HANA instance in which you wish to import metadata  Click on Configure Import Server  If the configuration settings don‟t exist, please enter the following entries, hit the apply button and close.  Server Address: verigtech11.dhcp.wdf.sap.corp  Repository Name: STUDENTXX  ODBC Data Source: <empty>  In the Content section of the Quick Launch page, click on Import.
  • 155. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 155  Open the Information Modeler folder if it‟s not already opened.  Click on the Source Objects node.  Click on Next  Select the target system and click Next.  Select the DS_ECC source system connection.  The list of available connections comes from Data Services. Only SAP Application datastores are listed as possible source connections.  Select Tables as the type of object to import.
  • 156. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 156  Type TCURR in the search box and click on the button with the arrow on it.  You can find objects by drilling into the SAP ERP application hierarchy or you can enter the text you want to seach for. The search performs a like search – *text* so that any object that contains the text you entered will be returned.  Select the TCURR table and add it to the Target.  Select your target schema (STUDENTXX) and click Next.  Click on Validate.  Make sure the status column has a green checkbox.  Click on Next.
  • 157. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 157  Click on Finish  Right click on the STUDENTXX Schema in the Navigator pane and click on Refresh. You should now see the TCURR table under the Tables folder.
  • 158. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 158 7.1.3 Import SAP ERP Metadata into SAP BusinessObjects Data Services 1. Go back to the SAP BusinessObjects Data Services Designer and go to the Datastore tab. 2. Select the DS_ECC Datastore you created previously and make sure you can see the Tables child node. 3. Right-click on the Tables node and click on Import By Name... 4. Enter TCURR as the name of the table you want to import.
  • 159. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 159 You can now use the TCURR table from the DS_ECC Datastore as either a data source or a data target. For this exercise, it will be your data source.
  • 160. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 160 7.1.3 Import SAP HANA Database Metadata into SAP BusinessObjects Data Services 1. From the Datastore tab, right-click and click on New. 2. Enter the following connection details...  Datastore name – DS_HANA  Datastore type – Database  Database type – HANA  Database version – 1.x  Data source – DS_HANA  User name – STUDENTXX  Password - training
  • 161. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 161 3. Right-click on the Tables node of the new HANA Datastore and click on Import By Name... 4. Enter the following...  Name - TCURR  Owner – STUDENTXX 5. Click on Import.
  • 162. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 162 You can now use the TCURR table from the DS_HANA Datastore as either a data source or a data target. For this exercise, it will be your data target.
  • 163. SAP HANA 1.0 – Student Workshop Materials copyrighted by the SAP Customer Solution Adoption (CSA) Team, Page: 163 7.1.3 Create a batch job in SAP BusinessObjects Data Services to extract data from SAP ERP and load it into SAP HANA Database 1. Click on the Create Project link of the Getting Started section. 2. Enter STUDENTXX as the project name 3. Click on Create. 4. In the Project Area located on the left side, right-click on your new project and click on New Batch Job. 5. Enter JOB_STUDENTXX as the name of the new batch job 6. Click on the Dataflow icon from the toolbar located on the right side of the main SAP BusinessObjects Data Services Designer window. 7. Click on the canvas to the left of the toolbar to add a new Dataflow to your new batch job. 8. Enter DF_STUDENTXX as the Dataflow name.