Vous êtes sur la page 1sur 546

HA300 - SAP HANA Implementation and

Modeling
Collection 97 SPS4
2012 SAP AG. All rights reserved. 2
SAP 2012
DISCLAIMER
This presentation and SAP's strategy and possible future developments are
subject to change and may be changed by SAP at any time for any reason
without notice.
This document is provided without a warranty of any kind, either express or
implied, including but not limited to, the implied warranties of
merchantability, fitness for a particular purpose, or non-infringement. SAP
assumes no responsibility for errors or omissions in this document, except if
such damages were caused by SAP intentionally or grossly negligent.
2012 SAP AG. All rights reserved. 3
2012 SAP AG. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose
without the express permission of SAP AG. The information contained herein may be
changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary
software components of other software vendors.
Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are
registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x,
System z, System z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power
Architecture, Power Systems, POWER7, POWER6+, POWER6, POWER, PowerHA,
pureScale, PowerPC, BladeCenter, System Storage, Storwize, XIV, GPFS, HACMP,
RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli,
Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the United States and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered
trademarks of Adobe Systems Incorporated in the United States and other countries.
Oracle and Java are registered trademarks of Oracle and its affiliates.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin
are trademarks or registered trademarks of Citrix Systems Inc.
HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C

,
World Wide Web Consortium, Massachusetts Institute of Technology.
Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C,
Retina, Safari, Siri, and Xcode are trademarks or registered trademarks of Apple Inc.
IOS is a registered trademark of Cisco Systems Inc.
RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry
Torch, BlackBerry Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App
World are trademarks or registered trademarks of Research in Motion Limited.
Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps,
Google Mobile Ads, Google Mobile Updater, Google Mobile, Google Store, Google Sync,
Google Updater, Google Voice, Google Mail, Gmail, YouTube, Dalvik and Android are
trademarks or registered trademarks of Google Inc.
INTERMEC is a registered trademark of Intermec Technologies Corporation.
Wi-Fi is a registered trademark of Wi-Fi Alliance.
Bluetooth is a registered trademark of Bluetooth SIG Inc.
Motorola is a registered trademark of Motorola Trademark Holdings LLC.
Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer,
StreamWork, SAP HANA, and other SAP products and services mentioned herein as well
as their respective logos are trademarks or registered trademarks of SAP AG in Germany
and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal
Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services
mentioned herein as well as their respective logos are trademarks or registered trademarks
of Business Objects Software Ltd. Business Objects is an SAP company.
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase
products and services mentioned herein as well as their respective logos are trademarks or
registered trademarks of Sybase Inc. Sybase is an SAP company.
Crossgate, m@gic EDDY, B2B 360, and B2B 360 Services are registered trademarks of
Crossgate AG in Germany and other countries. Crossgate is an SAP company.
All other product and service names mentioned are the trademarks of their respective
companies. Data contained in this document serves informational purposes only. National
product specifications may vary.
The information in this document is proprietary to SAP. No part of this document may be
reproduced, copied, or transmitted in any form or for any purpose without the express prior
written permission of SAP AG.
Copyright
2012 SAP AG. All rights reserved. 4
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
2012 SAP AG. All rights reserved. 1
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
Lesson1: Best practice guidelines
Unit 1: Approaching SAP HANA Modeling
2012 SAP AG. All rights reserved. 3
At the end of this Lesson you will be able to:
Objectives
Approaching SAP HANA Modeling
Take into account Persistency Considerations
Explain the different engine types in the
SAP HANA Architecture
To choose the best views for the Information Model
To discuss some General Recommendations
2012 SAP AG. All rights reserved. 4
This module covers the following topics:
Overview
Approaching SAP HANA Modeling
Persistency Considerations
SAP HANA Engine Overview
Choosing Views for the Information Model
2012 SAP AG. All rights reserved. 5
Persistency Considerations I
Approaching SAP HANA Modeling
Select a, b, c FROM persistence_model
Calculation View
Queries
Column
Table
RowTable
Via CE Build-In
function
Out =
CE_PROJECTION (:
data, [ a, b, c ] ;
Calculation View
Attribute
View
Via SQL
Statements
Data
Foundation
Attribute
View
Attribute
View
Column View
C
l
i
e
n
t
N
e
w
D
B
Analytic View

Out = SELECT a, b, c
FROM table:

5 4 3 2 1
2012 SAP AG. All rights reserved. 6
Persistency Considerations II
Approaching SAP HANA Modeling
1: Column Table 2: Analytical View
3: Calculation View
(SQL)
4: Calculation View
(CE Functions)
Usage
Good for quick
start with HANA.
Shall be used for
simple applications
and showcases.
Most
recommended for
analytical purpose,
where read
operations on
mass data is
required.
Good for quick build
of scenarios with
complex calculations.
The model is usually
simple and contains
only a few fields.
Recommended for
analytical purpose
using complex
calculation, which can
not be expressed in an
analytic view.
Pros
No additional
modeling required.
For most clients easy
to consume.
Very high
performance on
SELECT. Supported
by modeling. Well
optimized.
Building calculation
views via SQL syntax
is easy.
Client queries can be well
optimized and
parallelized. Usually
better performance
results than SQL.
Cons
No support for
analytical privileges,
multi language and
client handling.
Complex calculation
and logic shifted to
client side. In general
low performance.
Limitations in
regards to functions.
Client queries can be
less optimized and
could significantly be
slower compared to
other models.
Syntax is different
compared to well-known
SQL Language.
2012 SAP AG. All rights reserved. 7
SAP HANA Engine Overview I
Approaching SAP HANA Modeling
OLAP
Engine
Column Store
Join
Engine
Calculation Engine
Row Store
Row Store Engine
SQL Optimizer
2012 SAP AG. All rights reserved. 8
SAP HANA Engine Overview II
Approaching SAP HANA Modeling
OLAP
Engine
Join
Engine
Calculation Engine
Analytic
Views
Attribute
Views
Calculation
Views
2012 SAP AG. All rights reserved. 9
General Modeling Principles
Column
Store
Analytical
Views
Attribute
Views
Calculation Views
Client / Application
A B C D
A B C D G Y
A G Y
A G Y Z
Filter data amount as early as possible
in the lower layers (CONSTRAINTS,
WHERE Clause, Analytical Privileges..)
Aggregate data records (e.g using GROUP
BY, reducing Coulmns)
Avoid transfer data of large resultsets between the
HANA DB and client application
- Do calculation after aggregation.
- Avoid Complex expressions (IF,
CASE, ... )
Join on Key Columns or Indexed
Columns
Avoid calculations before
aggregation on line item level
Reduce data transfer between views
2012 SAP AG. All rights reserved. 10
Choosing Views for the Information Model
Approaching SAP HANA Modeling
Analyze Data in
HANA DB
Use Star-
schema or
Aggregation?
Use
Analytic View
Only Joins and
Calculated
Expressions?
Try Graphical
Calculation View
Use
Attribute View
Use
Graphical
Calculation View
Use
CalcScenario or
using CE-Functions
Use
Scripted
Calculation View
or Procedures
Yes
No
Yes
No
OK
Not enough
OK
Not enough
Use CalcScenario or
Scripted CalcView with
CE-Functions
2012 SAP AG. All rights reserved. 11
You should now be able to:
Summary
Approaching SAP HANA Modeling
Take into account Persistency Considerations
Explain the different engine types in the
SAP HANA Architecture
To choose the best views for the Information Model
To discuss some General Recommendations
2012 SAP AG. All rights reserved. 1
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
2012 SAP AG. All rights reserved. 2
At the end of this Lesson you will be able to:
Objectives
Connecting Tables
Explain differences between Inner Join, Left Outer Join,
Right Outer Join, Full Outer Join, Text Join and
referential Join when connecting tables.
Explain how using Standard Union and Union with
constant values.
2012 SAP AG. All rights reserved. 3
Business Example
Connecting Tables
Sales Order
Customer
State
We want to connect the Sales Order
table to the Customer table linked to
the State table.
2012 SAP AG. All rights reserved. 4
This module covers the following topics:
Overview
Connecting Tables
How to connect tables using
Inner Join
Left Outer Join
Right Outer Join
Full Outer Join
Text Join
Referential Join
Union
2012 SAP AG. All rights reserved. 5
Join Types Definitions and Referential Integrity
Join Type Use when you need to
report on
Be aware that
INNER
facts with matching dimensions
only
facts without any dimension will be excluded
dimensions without any fact will be excluded
JOIN is always performed
LEFT OUTER
all posted facts whether there is
a matching dimension or not
dimensions without any fact will be excluded
best for performance because JOIN is omissible
RIGHT OUTER
all dimensions whether there
are matching facts or not
facts without any dimension will be excluded
JOIN is always performed
REFERENTIAL
facts for the requested
dimensions
AND referential integrity is
ensured
it is the default join type
acts as an INNER for Attributes Views
join on attribute views is optional, which facts are
returned will depend on which attributes are queried for
TEXT
an SAP dimension table joined
to a text table for translation
purpose
only available for Attribute Views with SAP ERP tables
(SPRAS field) or equivalent design
acts as an INNER
2012 SAP AG. All rights reserved. 6
Attribute View
Inner Join Attribute View
Connecting Tables
Customer (3 & 4) is not
returned due to no
corresponding entry (TX) in
the state table.

Inner Join returns rows when there is at least one match in both sides of the join.
Inner is used even if its not added.
2012 SAP AG. All rights reserved. 7
Inner Join Analytical View
Connecting Tables
Analytical
View
Be aware that Inner Joins
lose facts with fragmented
dimensions. Order (4 & 77)
lost due to no
corresponding customer
and state record

2012 SAP AG. All rights reserved. 8


Inner Join and Design Time Filters
Connecting Tables
Design time filter applied (AGE < 13)
of left/central table
Design time filter applied to (STATE = MI)
on right table
Both design time filters are applied first
before the join is executed
2012 SAP AG. All rights reserved. 9
Attribute View
Left Outer Join Attribute View
Connecting Tables
No matches for TX in the right table.

Left Outer Join returns all rows from the left


table even if there are no matches in the
right table.
This join is popular in Analytical Views
whereby the Attribute view is joined to the
fact table.
2012 SAP AG. All rights reserved. 10
Left Outer Join Analytical View
Connecting Tables
Analytical
View
Customer (TOM) is
not returned due to no
corresponding sale
item record in sales
order table.

2012 SAP AG. All rights reserved. 11


Left Outer Join and Design Time Filters
Connecting Tables
Design time filter applied (AGE < 13)
of left/central table
Design time filter applied to (STATE = MI)
on right table
Filters are applied to both tables and then
afterwards the join is executed.
Due to the left outer join TOM will be included in
the result set even though he resides in TX
2012 SAP AG. All rights reserved. 12
Right Outer Join Attribute View
Connecting Tables
Alabama is included in the result set,
though there is no match in the left
table.
Attribute View
Right Outer Join returns all the rows from
the right table, even if there are no
matches in the left table.
2012 SAP AG. All rights reserved. 13
Right Outer Join Analytical View
Connecting Tables
Right Outer Join
results in NULL
measure.

Analytical
View

2012 SAP AG. All rights reserved. 14


Full Outer Join
Connecting Tables
STATE SNAME
? ? ? ? AL ALABAMA
1 WERNER 10 MI MI MICHIGAN
2 MARK 11 MI MI MICHIGAN
3 TOM 12 TX ? ?
4 BOB 13 TX ? ?
C_ID CNAME AGE STATE
Full Outer Join is neither left nor
right - it's both. It includes all the
rows from both of the tables or result
sets participating in the Join.
When no matching rows exist for
rows on the left side or right side of
the Join, you see NULL values.
2012 SAP AG. All rights reserved. 15
Text Join
Connecting Tables
Text Join are used to join a text
table to a master data table.
Text Joins acts as a Left Outer join
and can be used with SAP tables
where the language column
(SPRAS) is present.
For each attribute it is possible to
define a description mapping that
will be specific to the end users
language.
2012 SAP AG. All rights reserved. 16
Join Types Text Join for multilingual reporting
Text Join is used when
translation for a dimension is
available
Designed for ERP table (and
typically SPRAS field)
User language is used as a filter
at runtime to find the right
translation for that attribute
2012 SAP AG. All rights reserved. 17
Referential Join
Connecting Tables
Relies on Referential Integrity Each entry in the left table MUST have
a corresponding entry in the right table
Optimized for performance Join is only performed if at least one
field from the right table is requested.
Like an Inner Join when join is
executed
When field from both tables are
requested an inner Join is performed.
Only available in OLAP engine Referential join is a feature available
only in OLAP engine, when testing
Attribute Views outside the context of a
Analytical view then the Join Engine
will perform a Inner Join.
2012 SAP AG. All rights reserved. 18
Referential Join Attribute View
Connecting Tables
*** Referential join is a feature available only in OLAP engine, when testing
Attribute Views outside the context of a Analytical view then the Join Engine will
perform a Inner Join. As a result TOM and BOB will not be returned.
2012 SAP AG. All rights reserved. 19
Referential Join Analytical View
Connecting Tables
*** TOM is not returned due to no
corresponding facts in the sales table
*** The Amount includes all facts including Customer 77 and BOBs
order even through master records do not exist reason is when
only non-key fields are selected from the left table, all joins to
other tables will be omitted
*** Customer 77, TOM and BOB are not returned since C_ID is a Joined key field
resulting in an Inner Join. BOB has no corresponding Texas description and TOM has no
corresponding facts.
2012 SAP AG. All rights reserved. 20
Referential Join Using MDX
Connecting Tables
No referential integrity
of data in both tables
No Join processed
Like Inner Join
2012 SAP AG. All rights reserved. 21
Calculation View- Join vs. Union
Connecting Tables
Caution!! Do not JOIN Analytical Views, this could lead to performance
implications. Instead use Union with constant values when working with
multiple fact tables
2012 SAP AG. All rights reserved. 22
Unions
Connecting Tables
Unions are used to combine the result-set of two or more SELECT statements.
The Union operation is popular for combining plan and actual values in CO-PA.
Note that Unions are not supported in modeled artifacts (Attribute Views or Analytical
Views) and can only be realized in Calculation Views.
Refrain from Joining Analytical views; rather use Unions with Constant values.
Unions with Constant values are supported within Graphical Calculation Views and
the UNION operator can accept 1..N input sources.
Whereas a Script Based calculation views comparable CE_UNION_ALL function can
only accept 2 input sources at a given time.
2012 SAP AG. All rights reserved. 23
Standard Union
Connecting Tables
2012 SAP AG. All rights reserved. 24
Union with Constant Values
Connecting Tables
2012 SAP AG. All rights reserved. 25
You should now be able to:
Summary
Connecting Tables
Explain differences between Inner Join, Left Outer Join,
Right Outer Join, Full Outer Join, Text Join and
Referential Join when connecting tables.
Explain how using Standard Union and Union with
constant values.
2012 SAP AG. All rights reserved. 1
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
2012 SAP AG. All rights reserved. 2
Creating Restricted & Calculated Measures
Creating Attribute Views
Using Hierarchies
SAP HANA SQL - Introduction
Using Filter Operations
Using Variables
SQLScript and Procedures
Using Currency Conversion
Creating Calculation Views
Unit 3: Advanced Modeling
2012 SAP AG. All rights reserved. 3
At the end of this Lesson you will be able to:
Objectives
Creating Attribute Views
Explain how to create derived attribute views,
Explain how to create shared attribute views,
Explain how to create calculated attributes,
Explain how to create time characteristics based attribute views,
Explain how to create stand alone text tables.
Explain how to use base table aliases,
Explain how to include hidden attributes in an attribute view
3
2012 SAP AG. All rights reserved. 4
This module covers the following topics:
Overview
Creating Attribute Views
Derived Attribute Views,
Shared Attribute Views
Calculated Attributes
Time Characteristics Based Attribute Views
Stand Alone Text Tables
Using Base Table Aliases
Hidden Attributes
4
2012 SAP AG. All rights reserved. 5
Concept Attribute views
Creating Attribute Views
OLAP
Engine
Join
Engine
Calculation Engine
Analytic
Views
Attribute
Views
Calculation
Views
5
2012 SAP AG. All rights reserved. 6 2012 SAP AG. All rights reserved.
Derived Attribute Views
Creating Attribute Views
6
2012 SAP AG. All rights reserved. 7 2012 SAP AG. All rights reserved.
Shared Attribute Views
Creating Attribute Views
7
2012 SAP AG. All rights reserved. 8 2012 SAP AG. All rights reserved.
Calculated Attributes
Creating Attribute Views
8
2012 SAP AG. All rights reserved. 9 2012 SAP AG. All rights reserved.
Time Characteristics Attribute View
Creating Attribute Views
9
2012 SAP AG. All rights reserved. 10 2012 SAP AG. All rights reserved.
Creating Stand Alone Text Tables
Creating Attribute Views
10
2012 SAP AG. All rights reserved. 11 2012 SAP AG. All rights reserved.
Using Multiple Base Tables Using Aliases
Creating Attribute Views
11
You will be prompted for
an alias name when
adding multiple instances
of the same base table
2012 SAP AG. All rights reserved. 12 2012 SAP AG. All rights reserved.
Hidden Attributes
Creating Attribute Views
12
There may be instances where you want
to include Attributes in your Analytical
View (such as for granularity purposes)
but for reporting you want these to be
hidden.
This can be achieved by setting the
Hidden property of the attribute to
True.
In the context of an
Analytical View this attribute
will then not be visible.
2012 SAP AG. All rights reserved. 13
You should now be able to:
Summary
Creating Attribute Views
Explain how to create derived attribute views,
Explain how to create shared attribute views,
Explain how to create calculated attributes,
Explain how to create time characteristics based attribute views,
Explain how to create stand alone text tables,
Explain how to use base table aliases,
Explain how to include hidden attributes in an attribute view
13
Creating Restricted & Calculated Measures
Creating Attribute Views
Using Hierarchies
SAP HANA SQL - Introduction
Using Filter Operations
Using Variables
SQLScript and Procedures
Using Currency Conversion
Creating Calculation Views
Unit 3: Advanced Modeling
2012 SAP AG. All rights reserved. 15
At the end of this Lesson you will be able to:
Objectives
Using Hierarchies
Explain how to implement leveled hierarchies,
Explain how to leverage parent / child hierarchies,
Explain how to create attribute based hierarchies.
15
2012 SAP AG. All rights reserved. 16
This module covers the following topics:
Overview
Using Hierarchies
Implement Leveled Hierarchies
Leverage Parent Child Hierarchies
Create Attribute Based Hierarchies
16
2012 SAP AG. All rights reserved. 17
Concept Using Hierarchies
Using Hierarchies
Hierarchies in HANA could only
be used by reporting tools using
MDX connectivity
For example, consider the TIME attribute view with YEAR, QUARTER, and
MONTH attributes. You can use these YEAR, QUARTER, and MONTH attributes
to define a hierarchy for the TIME attribute view as follows:
17
Quarter 4
Sep
Quarter 3 Quarter 2 Quarter 1
Year
Aug Jul
Dec Nov Oct
Mar Feb Jan
Jun May Apr
2012 SAP AG. All rights reserved. 18
Using Hierarchies
Using Hierarchies
Hierarchies in HANA could only
be used by reporting tools using
MDX connectivity
Let's have a look at the following hierarchy, a minimal example :
18
2012 SAP AG. All rights reserved. 19 2012 SAP AG. All rights reserved.
Implement Leveled Hierarchies
Using Hierarchies
This page describes step-by-step
how to create a SAP HANA
Database hierarchy view by
means of the SAP Hana Modeler.
Create a table providing some
hierarchy source data :
Level Hierarchies are hierarchies that are rigid in nature, where the root and the
child nodes can be accessed only in the defined order. For example,
organizational structures, and so on.
19
2012 SAP AG. All rights reserved. 20 2012 SAP AG. All rights reserved.
Implement Leveled Hierarchies
Using Hierarchies
If necessary, create a
package in the Modeler.
Create an attribute view
in the Modeler :
20
2012 SAP AG. All rights reserved. 21 2012 SAP AG. All rights reserved.
Implement Leveled Hierarchies
Using Hierarchies
Select the source table
as basis for the view :
21
2012 SAP AG. All rights reserved. 22 2012 SAP AG. All rights reserved.
Implement Leveled Hierarchies
Using Hierarchies
Select the attributes that should be part of the source view :
22
2012 SAP AG. All rights reserved. 23 2012 SAP AG. All rights reserved.
Implement Leveled Hierarchies
Using Hierarchies
Right click on the Hierarchies folder, create a New
Level Hierarchy:
23
2012 SAP AG. All rights reserved. 24 2012 SAP AG. All rights reserved.
Implement Leveled Hierarchies
Using Hierarchies
For a leveled hierarchy,
add the attributes to the
hierarchy in the correct
level order from top to
bottom, with the lowest
granularity at the lowest
level of the hierarchy:
24
2012 SAP AG. All rights reserved. 25 2012 SAP AG. All rights reserved.
Leverage Parent Child Hierarchies
Using Hierarchies
Parent and Child Hierarchies can
be illustrated as for example an
Employee Master (Employee and
Manager).
The hierarchy can be explored
based on a selected parent, and
there are cases where the child
can be a parent.
If you want to create a parent-child
hierarchy, make sure the
child/successor attribute's property
"Principal Key" to True :
25
2012 SAP AG. All rights reserved. 26 2012 SAP AG. All rights reserved.
Leverage Parent Child Hierarchies
Using Hierarchies
Right click on the Hierarchies tab, and select a New Parent Child Hierarchy:
26
2012 SAP AG. All rights reserved. 27 2012 SAP AG. All rights reserved.
Leverage Parent Child Hierarchies
Using Hierarchies
For a Parent Child Hierarchy there is
no need to define the Child Attribute,
as you have already done so when
you have specified the Principal Key of
the Table.
What you will however need to specify
is the Parent Attribute of the Child:
27
2012 SAP AG. All rights reserved. 28 2012 SAP AG. All rights reserved.
Hierarchy Active Property
Using Hierarchies
28
MDX per default only shows
key Attributes.
If Hierarchy Active = false
for non-key Attribute, then
the Attribute will not show up
in the MDX reporting tool.
2012 SAP AG. All rights reserved. 29 2012 SAP AG. All rights reserved.
Hierarchy Active Property
Using Hierarchies
29
By enabling Hierarchy Active for non-key
Attributes, you can make sure the Attribute can
be used for reporting, even though it is not a key
field.
2012 SAP AG. All rights reserved. 30
You should now be able to:
Summary
Using Hierarchies
Explain how to implement leveled hierarchies,
Explain how to leverage parent / child hierarchies,
Explain how to create attribute based hierarchies.
30
Creating Restricted & Calculated Measures
Creating Attribute Views
Using Hierarchies
SAP HANA SQL - Introduction
Using Filter Operations
Using Variables
SQLScript and Procedures
Using Currency Conversion
Creating Calculation Views
Unit 3: Advanced Modeling
2012 SAP AG. All rights reserved. 32
At the end of this Lesson you will be able to:
Objectives
Creating Restricted & Calculated Measures
32
Understand the benefits of Restricted Measures
Use Restricted Measures
Understand when to use Calculated Measures
Create Calculated Measures
2012 SAP AG. All rights reserved. 33
This module covers the following topics:
Overview
Using Filter Operations
Concepts for Restricted & Calculated
Measures
Using Restricted Measures
Creating Calculated Measures
33
2012 SAP AG. All rights reserved. 34
The benefits of Restricted Measures
Creating Restricted & Calculated Measures
Country Month Amount
DE 2010-01 12.345,00
DE 2010-02 15.678,00
DE 2010-03 25.814,00
DE 2010-04 21.586,00
DE 2010-05 21.861,00
DE 2010-06 11.258,00
DE 2010-07 12.387,00
DE 2010-08 13.589,00
DE 2010-09 12.345,00
DE 2010-10 15.678,00
DE 2010-11 25.814,00
DE 2010-12 21.586,00
US 2010-01 21.861,00
US 2010-02 11.258,00
US 2010-03 12.387,00
US 2010-04 13.589,00
US 2010-05 12.345,00
US 2010-06 15.678,00
US 2010-07 25.814,00
US 2010-08 21.586,00
US 2010-09 21.861,00
US 2010-10 11.258,00
US 2010-11 12.387,00
US 2010-12 25.814,00
DE US Difference
209.941,00 205.838,00 4.103,00
Country Q1 Q2
DE 53.837,00 54.705,00
US 45.506,00 41.612,00
Restricted by Country:
Restricted by Months:
34
What is a Restricted Measure?
As the name implies it is a
measure that does not give the
complete picture of a measure,
it is restricted to a subset of the
original measure.
The benefit of a Restricted
Measure is, that it expands the
modeling options in a view,
giving the modeler the
possibilities of creating objects
that can be easily reported on or
reused.
2012 SAP AG. All rights reserved. 35 2012 SAP AG. All rights reserved. 35
Using Restricted Measures
Creating Restricted & Calculated Measures
35
Picture the example in the right table.
You have a transactional table with cost
data items, with each cost type split on a
different line.
If you want to find out the shipping cost
you could create an Analytic View with
Cost Type as an Attribute, and Amount
as a Measure.
You could then restrict your report by
reporting on Cost Type, setting the
Attribute filtered on Cost Type =
Shipping Cost.
2012 SAP AG. All rights reserved. 36 2012 SAP AG. All rights reserved. 36
Using Restricted Measures
Creating Restricted & Calculated Measures
In order to utilize a Restricted Measure, you can instead create one which
already limits the results to Shipping Costs only within the measure itself.
2012 SAP AG. All rights reserved. 37 2012 SAP AG. All rights reserved. 37
Using Restricted Measures
Creating Restricted & Calculated Measures
The Attribute you filter the Restricted
Measure does not have be limited to one
single Attribute.
You can set it restricted to multiple
attributes depending on your reporting
requirements.
There are also multiple operators to
choose from.
2012 SAP AG. All rights reserved. 38 2012 SAP AG. All rights reserved. 38
Using Restricted Measures
Creating Restricted & Calculated Measures
Further, the Restricted Measure does not
have to be a straight sum of the Measure
that it is based on.
The Aggregation Types that you have
available are:
SUM
MIN
MAX
2012 SAP AG. All rights reserved. 39
When to use Calculated Measures
Creating Restricted & Calculated Measures
39
In a data model sometimes not
all Measures available in the
base data will give your users
sufficient information for
reporting if you just provide the
base Measures in your views.
SAP HANA has a type of
Measure available called
Calculation Measures where
the modeler is able to include
calculations already within the
view in order to help reporting
or further modeling.
3
r
3 4

V=
2012 SAP AG. All rights reserved. 40
When to use Calculated Measures
Creating Restricted & Calculated Measures
When you include calculations in
your views using Calculated
Measures you take advantage of
the speed of SAP HANA letting
the database engine perform the
calculations, instead of doing
these calculations in your end
client reporting tool.
Having ready defined calculations
in views can also help simplifying
reporting by unifying calculations
having them calculated in the
same way for all users instead of
having users or developers create
their own versions of the
calculations.
OLAP
Engine
Column
Store
Join
Engine
Calculation Engine
Row
Store
Client Application
A B C D G Y
A G Y Z
Do calculation
after aggregation
Avoid calculation
before aggregation
on line item level
2012 SAP AG. All rights reserved. 41 2012 SAP AG. All rights reserved. 41
Creating Calculated Measures
Creating Restricted & Calculated Measures
A Calculated Measure is defined in the view and when you create one you can
use the calculations, mathematical functions etc. available in the editor.
2012 SAP AG. All rights reserved. 42 2012 SAP AG. All rights reserved. 42
Creating Calculated Measures
Creating Restricted & Calculated Measures
For certain measure it is not possible to perform the calculations when the
measures are already aggregated. The aggregated granularity of for example
Price does not mean anything.
2012 SAP AG. All rights reserved. 43 2012 SAP AG. All rights reserved. 43
Creating Calculated Measures
Creating Restricted & Calculated Measures
For these types of Measures
you can predefine the
Calculated Measure to
calculate each individual item
before aggregating.
This is done by selecting the
option Calculate Before
Aggregation.
2012 SAP AG. All rights reserved. 44 2012 SAP AG. All rights reserved. 44
Creating Calculated Measures
Creating Restricted & Calculated Measures
This way you can be sure
that you end up with a correct
sum as the calculation are
performed on the correct
granular level.
2012 SAP AG. All rights reserved. 45
You should now be able to:
Objectives
Using currency Conversion
45
Understand the benefits of Restricted Measures
Use Restricted Measures
Understand when to use Calculated Measures
Create Calculated Measures
Creating Restricted & Calculated Measures
Creating Attribute Views
Using Hierarchies
SAP HANA SQL - Introduction
Using Filter Operations
Using Variables
SQLScript and Procedures
Using Currency Conversion
Creating Calculation Views
Unit 3: Advanced Modeling
2012 SAP AG. All rights reserved. 47
At the end of this Lesson you will be able to:
Objectives
Using Filter Operations
Explain how to compare constraint filter and WHERE clause,
Explain how to create client dependant views,
Explain how to model domain fix values.
2012 SAP AG. All rights reserved. 48
This module covers the following topics:
Overview
Using Filter Operations
Compare constraint filter and WHERE clause,
Create client dependant views,
Model domain fix values.
48
2012 SAP AG. All rights reserved. 49
Filter Operations
Using Filter Operations
OLAP
Engine
Column
Store
Join
Engine
Calculation Engine
Row
Store
Client Application
Reduce data transfer between the
engines
by using Filter Operations like :
Using a Constraint or WHERE clause
Creating Client Dependant Views
Using Model Domain Fix Values
49
2012 SAP AG. All rights reserved. 50
Compare Constraint Filter & WHERE Clause
Using Filter Operations
Constraint filter :
Is defined on design time on
a table,
The filter applies on the table
before the query starts to
execute,
Normally faster than
WHERE clause, as the
results set is reduced before
proceeding with the query
execution plan, e.g.
constraints applied before a
table join is executed.
WHERE clause :
Is defined on runtime in the
SQL query,
The filters applies on the
results set of a query.
Vs
50
2012 SAP AG. All rights reserved. 51 2012 SAP AG. All rights reserved.
Create Client Dependant Views
Using Filter Operations
Define the value of the Session
Client in the definition of the User
ID. The variable constraint is
substituted at runtime by the client
that is set for the current user
running a query on the model:
Define Default Client as
dynamic in properties of your
views (Attribute Views and Analytic
Views)
51
2012 SAP AG. All rights reserved. 52 2012 SAP AG. All rights reserved.
Model Fix Values
Using Filter Operations
52
2012 SAP AG. All rights reserved. 53 2012 SAP AG. All rights reserved.
Model Fix Values
Using Filter Operations
53
2012 SAP AG. All rights reserved. 54
You should now be able to:
Summary
Using Filter Operations
Explain how to compare constraint filter and WHERE clause,
Explain how to create client dependant views,
Explain how to model domain fix values.
54
Creating Restricted & Calculated Measures
Creating Attribute Views
Using Hierarchies
SAP HANA SQL - Introduction
Using Filter Operations
Using Variables
SQLScript and Procedures
Using Currency Conversion
Creating Calculation Views
Unit 3: Advanced Modeling
2012 SAP AG. All rights reserved. 56
At the end of this Lesson you will be able to:
Objectives
Creating Variables
Explain the difference between Variables and
Input Parameters
Create Variables
Create Input Parameters
2012 SAP AG. All rights reserved. 57
This module covers the following topics:
Overview
Creating Variables
Understanding the difference between Variables and Input
Parameters
How to create Variables and apply them as Filters
How to make use of different types of Input Parameters
57
2012 SAP AG. All rights reserved. 58
Variables and Input Parameters Concepts
Creating Variables
58
In an Attribute or Calculation view you
can create two types of objects to get
data from reporting users:
Variables
These are bound to attributes and are
used for filtering. As such, they can only
contain the values available in the
Attribute they relate to.
Input Parameters
Can contain any value the reporting
user want to enter. Therefore, a data
type for the Input Parameter must be
specified.
2012 SAP AG. All rights reserved. 59
Variables and Input Parameters Concepts
Creating Variables
You use variables to filter data at
runtime. You assign values to these
variables by entering the value
manually, or by selecting it from the
drop-down list.
Using variables means that you do not
need to decide the restriction on the
value of attributes at the design time.
You can apply variables in the analytic
and calculation views.
If a calculation view is created using
an analytic view with variables, those
variables are also available in the
calculation view but cannot be edited.
OLAP
Engine
Column
Store
Join
Engine
Calculation Engine
Row
Store
Client Application
59
2012 SAP AG. All rights reserved. 60
Variables Types
Creating Variables
Type Description
Single Value
Use this to apply a filter to a Single Value
Interval
Use this where you want the user to specify a set start and end to
a selected Interval.
Range
Use this when you want the end user to be able to use operators
such as Greater Than or Less Than.
60
Range Variable Example:
The following types of Variables are supported:
2012 SAP AG. All rights reserved. 61 2012 SAP AG. All rights reserved.
Creating Variables for Filtering
Creating Variables
A variable restricts the results in the
view for the selected Attribute.
You select the Attribute in the view that
you want to filter on, and you also
define the:
Selection Type: Whether selections
should be based on intervals, ranges or
single values.
Multiple Entries: Whether multiple
values of the selection types should be
allowed.
You can also define whether the
Variable is Mandatory or if it should
have a Default Value.
61
2012 SAP AG. All rights reserved. 62 2012 SAP AG. All rights reserved.
Creating Variables for Filtering
Creating Variables
Just creating a Variable will however not enable the users to
filter the result set.
After a variable has been created it also needs to be assigned
and applied to an Attribute as a Filter.
62
2012 SAP AG. All rights reserved. 63 2012 SAP AG. All rights reserved.
Creating Variables for Filtering
Creating Variables
63
By right clicking on the
appropriate Attribute and
applying a filter, you can then
select a Variable as an operator
for the filter, and then specify the
created Variable.
The correct Data Type will then
automatically be assigned to the
filter.
2012 SAP AG. All rights reserved. 64 2012 SAP AG. All rights reserved.
Creating Variables for Filtering
Creating Variables
When displaying the data of a View with a Variable or Input Parameter included,
the Value Help Dialog you can help you or the reporting user to find the selections
you are looking for.
64
2012 SAP AG. All rights reserved. 65
Input Parameters Concept
Creating Variables
You might not want a variable to just
restrict the data of a view.
You might want to take input from the
user and process it, returning dynamic
data based on the user selection.
Input Parameters makes this possible.
65
2012 SAP AG. All rights reserved. 66
Input Parameter Types
Creating Input Variables
Type Description
Currency
Use this during currency conversion where the end user should
specify a source or target currency.
Date
Use this to retrieve a date from the end user using a calendar
type input box.
Static List
Use this when the end user should have a set list of values to
choose from.
Attribute Value
When an Input Variable has this type, it serves the same
purpose as a normal Variable.
(none)
If none of the above applies you do not have to specify an Input
Variable type. The Type can be left blank
66
The following types of Input variables are supported:
2012 SAP AG. All rights reserved. 67 2012 SAP AG. All rights reserved.
Creating Input Parameters
Creating Variables
If we want the end user to decide
whether Gross or Net amount should
be shown in a View, what we first
need to do is to create an Input
Parameter to be used in a
calculation.
The Input Parameter can be of any
suitable type, for example a
StaticList type.
In this example to the left the user
can choose either Gross or Net
as the selection.
67
2012 SAP AG. All rights reserved. 68 2012 SAP AG. All rights reserved.
Creating Input Parameters
Creating Variables
if('$$INP_GROSS_OR_NET$$'='Gross',"GROSS_AMOUNT","NET_AMOUNT")
We also need somewhere to
call the Input Parameter from.
In for example a Calculated
Measure, we can reference
the result of the user selected
Input Parameter.
This is done by calling it
within double dollar signs,
see example:
68
2012 SAP AG. All rights reserved. 69 2012 SAP AG. All rights reserved.
Creating Input Parameters
Creating Variables
The Input Parameter type Date can be
useful when you for example want an
input date from the reporting user in
order to create further calculations on.
Whatever input is selected in the
variable can be used as a basis for
extended calculations.
69
2012 SAP AG. All rights reserved. 70 2012 SAP AG. All rights reserved.
Creating Input Parameters
Creating Variables
When using the type Date you are
making it easier for the end user to
select a date by utilizing a calendar
dialog for selecting the appropriate
date.
70
2012 SAP AG. All rights reserved. 71
You should now be able to:
Objectives
Creating Variables
Explain the difference between Variables and
Input Parameters
Create Variables
Create Input Parameters
71
Creating Restricted & Calculated Measures
Creating Attribute Views
Using Hierarchies
SAP HANA SQL - Introduction
Using Filter Operations
Using Variables
SQLScript and Procedures
Using Currency Conversion
Creating Calculation Views
Unit 3: Advanced Modeling
2012 SAP AG. All rights reserved. 73
At the end of this Lesson you will be able to:
Objectives
Creating Calculation Views
Explain how to create calculated attributes in a calculation view
Explain how to create simple calculation views (non aggregate)
Explain how to use the aggregation node
Explain how to define unmapped columns in a union node
73
2012 SAP AG. All rights reserved. 74
This module covers the following topics:
Overview
Creating Calculation Views
Calculated Attributes in Calculation Views
Simple Calculation Views
Aggregation Node
Unmapped Columns in a Union Node
74
2012 SAP AG. All rights reserved. 75
Concept Calculation Views
Creating Calculation Views
OLAP
Engine
Join
Engine
Calculation Engine
Analytic
Views
Attribute
Views
Calculation
Views
75
2012 SAP AG. All rights reserved. 76 2012 SAP AG. All rights reserved.
Calculated Attributes in Calculation Views
Creating Calculation Views
76
Apart from being able
to hold standard
Attributes, a
Calculation View can
also contain
Calculated Attributes.
This means that with
the columns
generated by the
Calculation View, you
can also create new
Calculated Attributes
specific to the
Calculation View.
2012 SAP AG. All rights reserved. 77 2012 SAP AG. All rights reserved.
Simple Calculation Views
Creating Calculation Views
77
A standard Calculation View will group
the measures by dimension, thereby
producing an aggregated result.
If this behavior is not wanted, it is
possible to create a Simple Calculation
View by setting the Multidimensional
Reporting of the view to disabled.
This can be useful when it is required
to necessary to create a list based
view, in essence creating a complex
Attribute View.
For this functionality to be utilised the
Calculation View can however only
contain attributes, no measures.
2012 SAP AG. All rights reserved. 78 2012 SAP AG. All rights reserved.
Simple Calculation Views
Creating Calculation Views
78
Country Value
Germany 3
Germany 17
Italy 5
Italy 5
Country Value
Germany 20
Italy 10
Country Value
Germany 3
Germany 17
Italy 5
It is necessary to understand the
impact of using a Simple
Calculation View when dealing with
values.
A Simple Calculation View is not
meant to aggregate measures, so a
careful approach has to be taken
when including values.
It behaves like an Attribute View in
that it also:
Provides a list of the distinct values
without aggregation
Does not allow the usage of
measures
Source Data:
Calculation View:
Simple
Calculation View:
2012 SAP AG. All rights reserved. 79 2012 SAP AG. All rights reserved.
Aggregation Node
Creating Calculation Views
79
In order to have further control of how the aggregation is done, it is beneficial to
use the aggregation node in Graphical Calculation Views.
When using the aggregation node you can specify which columns should be
aggregated and also the aggregation type (sum, min or max).
You can also add Calculated Columns to the node. These calculations will be
performed after aggregation.
2012 SAP AG. All rights reserved. 80 2012 SAP AG. All rights reserved.
Unmapped Columns in a Union Node
Creating Calculation Views
80
When you have several result
sets that you want to union
together, placing them on top of
each other.
This can be done both in
Graphical Calculation Views and
SQL Script Calculation Views.
In SQL Script this is done using
CE functions.
In Graphical Calculation views
this is done using the Union
Node.
In order for the columns from the different
sources to go into the correct target, a
mapping will need to be provided.
This can be done via a drag and drop
interface.
2012 SAP AG. All rights reserved. 81 2012 SAP AG. All rights reserved.
Unmapped Columns in a Union Node
Creating Calculation Views
81
There could be instances
when a union needs to be
performed where the sources
have a different number of
columns.
You can then set a Constant
Value for the source columns
that do not have the target
column.
The Constant Value can be
set by right-clicking on the
Target column, selecting
Manage Mappings.
2012 SAP AG. All rights reserved. 82 2012 SAP AG. All rights reserved.
Creating Restricted & Calculated Measures
Creating Attribute Views
Using Hierarchies
SAP HANA SQL - Introduction
Using Filter Operations
Using Variables
SQLScript and Procedures
Using Currency Conversion
Creating Calculation Views
Unit 3: Advanced Modeling
2012 SAP AG. All rights reserved. 83 2012 SAP AG. All rights reserved.
Objectives
SAP HANA SQL
Explain the language elements used in SAP HANA
SQL statements.
2012 SAP AG. All rights reserved. 84 2012 SAP AG. All rights reserved.
Overview
SAP HANA SQL
84
Overview SQL Language Elements
Identifiers
SQL Data Types
Predicates and Operators
Functions and Expressions
SQL Statements - Examples
2012 SAP AG. All rights reserved. 85 2012 SAP AG. All rights reserved.
SQL - Definition
SAP HANA SQL
Structured Query Language
Standardized language
for communication with
a relational database.
Used to retrieve, store
or manipulate
information in the
database.
Class Description
Example
DDL
Data Definition
Language
CREATE, ALTER,
DROP TABLE
DML
Data Manipulation
Language
SELECT, DELETE,
INSERT, UPDATE
DCL
Data Control
Language
GRANT, REVOKE
85
2012 SAP AG. All rights reserved. 86 2012 SAP AG. All rights reserved.
SQL language elements
SAP HANA SQL
86
Identifiers Used to represent names used in SQL statement
Data types Specify the characteristics of a data value
Expressions Clause that can be evaluated to return values
Operators Used for calculation, value comparison or to assign values
Predicates
Specified by combining one or more expressions or logical
operators and returns one of the following logical or truth
values: TRUE, FALSE, or UNKNOWN
Functions Used in expressions to return information from the database
2012 SAP AG. All rights reserved. 87 2012 SAP AG. All rights reserved.
Comment and Code page
SAP HANA SQL
Codepage
The SAP HANA database supports Unicode to allow use of all languages
in the Unicode Standard and 7 Bit ASCII code page without restriction.
87
Comments
--
double hyphens
/*
<>
*/
2012 SAP AG. All rights reserved. 88 2012 SAP AG. All rights reserved.
Identifiers
SAP HANA SQL
88
2012 SAP AG. All rights reserved. 89 2012 SAP AG. All rights reserved.
SQL Data types
SAP HANA SQL
Classification
Data Type
Datetime types
DATE, TIME, SECONDTIME, TIMESTAMP
Numeric types
TINYINT, SMALLINT, INTEGER, BIGINT,
SMALLDECIMAL, DECIMAL, REAL, DOUBLE, FLOAT
Character string types
VARCHAR, NVARCHAR, ALPHANUM, SHORTTEXT
Binary types
VARBINARY
Large Object types
BLOB, CLOB, NCLOB, TEXT
89
2012 SAP AG. All rights reserved. 90 2012 SAP AG. All rights reserved.
Predicates
SAP HANA SQL
90
Comparison Predicates
<expression>
{ = | != | <> | > | < | >= | <= }
[ ANY | SOME| ALL ]
{ <expression_list> | <subquery> }
Range Predicate
<expression1> [NOT] BETWEEN <expression2> AND
<expression3>
In Predicate
<expression> [NOT] IN { <expression_list> | <subquery> }
Exists Predicate
[NT] EXISTS ( <subquery> )
LIKE Predicate
<expression1> [NOT] LIKE <expression2>
[ESCAPE <expression3>]
NULL Predicate
<expression> IS [NOT] NULL
2012 SAP AG. All rights reserved. 91 2012 SAP AG. All rights reserved.
Operators
SAP HANA SQL
Unary
operator operand
unary plus operator(+)
unary negation operator(-)
logical negation(NOT)
Binary
operand1 operator operand2
multiplicative ( *, / ), additive ( +,- )
comparison operators
( =,!=,<,>,<=,>=)
logical operators ( AND, OR )
Arithmetic
Operators
-< expression >
< expression > operator < expression >
Negation, Addition, Subtraction
Multiplication, Division
String
Operator
< expression > || < expression > String concatenation
Comparison
Operators
<expression> operator <expression>
>= Greater or equal to
<= Less than or equal to
!=, <> Not equal
Logical
Operators
Search conditions can be combined using
AND or OR operators. You can also
negate them using the NOT operator.
AND, OR NOT
Set Operators
Set operators perform operations on the
results of two or more queries.
UNION, UNION, ALL, INTERSECT,
EXCEPT
91
2012 SAP AG. All rights reserved. 92 2012 SAP AG. All rights reserved.
Functions
SAP HANA SQL
Classification Examples
Data type conversion Functions CAST, TO_ALPHANUM, TO_BIGINT,
DateTime Functions
ADD_DAYS, ADD_MONTHS, ADD_YEARS,
DAYS_BETWEEN, DAYNAME, CURRENT_DATE,

Number Functions ABS, ACOS, ASIN, ATAN, COS


String Functions CONCAT, LEFT, LENGTH, TRIM,
Miscellaneous Functions IFNULL, CURRENT_SCHEMA,
92
2012 SAP AG. All rights reserved. 93 2012 SAP AG. All rights reserved.
Expressions
SAP HANA SQL
Case Expressions
IF ... THEN ... ELSE logic without using procedures in SQL
statements.
Function Expressions SQL built-in functions can be used as an expression.
Aggregate Expressions
Uses an aggregate function to calculate a single value from the values
of multiple rows in a column.
Subqueries in
expressions
SELECT statement enclosed in parentheses.
93
2012 SAP AG. All rights reserved. 94 2012 SAP AG. All rights reserved.
Expressions: Examples
SAP HANA SQL
94
Case expression
You can use IF ... THEN ... ELSE logic
without using procedures in SQL statements.
<expression> ::= CASE <expression>
WHEN <expression>
THEN <expression>, ...
[ ELSE <expression>]
{ END | END CASE }
Aggregate Expressions
<expression> ::= COUNT(*) | <agg_name>
( [ ALL | DISTINCT ] <expression> ) <agg_name> ::= COUNT |
MIN | MAX | SUM | AVG | STDDEV | VAR
2012 SAP AG. All rights reserved. 95 2012 SAP AG. All rights reserved.
SQL statement: Create Table
SAP HANA SQL
CREATE [<table_type>] TABLE <table_name> <table_contents_source> ;
table_type ::= COLUMN | ROW | HISTORY COLUMN | GLOBAL TEMPORARY | LOCAL
TEMPORARY
table_contents_source ::= ( <table_element>, )|[ (column_name, ...) ] |
[<like_table_clause> | <as_table_subquery>]
[ WITH [NO] DATA ] ]
table_element ::= column_definition column_constraint | table_constraint
( column_name, ... )
like_table_clause ::= LIKE like_table_name
as_table_subquery ::= AS (<select_query>)
column_definition ::= column_name data type [<column store data type>]
[<ddic data type>] [DEFAULT default_value]
[GENERATED ALWAYS AS <expression> ]
95
2012 SAP AG. All rights reserved. 96 2012 SAP AG. All rights reserved.
Create Table - Table Types
SAP HANA SQL
COLUMN
COLUMN-based storage should be used, if the majority
of access is through a large number of tuples but with
only a few selected attributes.
ROW
ROW-based storage is preferable, if the majority of
access involves selecting a few records with all attributes
selected.
HISTORY COLUMN
Creates a table with a particular transaction session type
called HISTORY. Tables with session type HISTORY
support time travel; the execution of queries against
historic states of the database is possible.
GLOBAL TEMPORARY
Table definition is globally available while data is visible
only to the current session.
The table is truncated at the end of the session.
LOCAL TEMPORARY
The table definition and data is visible only to the current
session.
The table is truncated at the end of the session.
96
2012 SAP AG. All rights reserved. 97 2012 SAP AG. All rights reserved.
Create Table - Example
SAP HANA SQL
Table Type
Table Elements
Column Constraint
Column Definition
Data Type
97
2012 SAP AG. All rights reserved. 98 2012 SAP AG. All rights reserved.
SQL statement: Insert
SAP HANA SQL
INSERT INTO <table_name> [ ( column_name, ... ) ]
{ VALUES (expr, ... ) | <subquery> } ;
98
2012 SAP AG. All rights reserved. 99 2012 SAP AG. All rights reserved.
SQL statement: Select
SAP HANA SQL
SELECT [TOP number ] [ ALL | DISTINCT ]
<select_list>
<from_clause >
[<where_clause>]
[<group_by_clause>]
[<having_clause>]
[<order_by_clause>]
[<limit_clause>]
[<for_update_clause>]
[<time_travel_clause>] ;
99
2012 SAP AG. All rights reserved. 100 2012 SAP AG. All rights reserved.
Summary
Approaching SAP HANA Modeling
100
Explain the language elements used in SAP HANA
SQL statements.
2012 SAP AG. All rights reserved. 101 2012 SAP AG. All rights reserved.
Creating Restricted & Calculated Measures
Creating Attribute Views
Using Hierarchies
SAP HANA SQL - Introduction
Using Filter Operations
Using Variables
SQLScript and Procedures
Using Currency Conversion
Creating Calculation Views
Unit 3: Advanced Modeling
2012 SAP AG. All rights reserved. 102 2012 SAP AG. All rights reserved.
Objectives
SQLScript and Procedures
Explain SQLScript and SQLScript extensions
SQLScript implementation logic
Create and call a Procedure
Explain calculation engine and calculation model
Explain functionality of Calculation engine operators
2012 SAP AG. All rights reserved. 103 2012 SAP AG. All rights reserved.
Overview
SQLScript and Procedure
103
Introduction to SQLScript
Overview of SQLScript Extensions
SQLScript implementation logic
Procedures
Introduction to calculation engine and calculation model
Introduction to Calculation engine operators
2012 SAP AG. All rights reserved. 104 2012 SAP AG. All rights reserved.
SQLScript: Concept
SQLScript and Procedures
Data Extension Allows the definition of table types without
corresponding tables.
Functional Extension Allows definitions of (side-effect free) functions
which can be used to express and encapsulate
complex data flows
Procedural Extension Provides imperative constructs executed in the
context of the database process.
SQLScript allows developer to push data intensive logic into the database.
SQLScript encourages developer to implement algorithms using a set-
oriented paradigm instead of one tuple at a time paradigm.
SQLScript allows usage of imperative as well as declarative statements.
104
SQLScript is a collection of extensions to Structured Query Language
(SQL).
2012 SAP AG. All rights reserved. 105 2012 SAP AG. All rights reserved.
SQLScript: Implementation Logic
SQLScript and Procedures
Orchestration Logic
Imperative Extension
Declarative Logic
Functional Extension
SQL Script Client
x
x
x
105
2012 SAP AG. All rights reserved. 106 2012 SAP AG. All rights reserved.
SQLScript: Data Type Extensions
SQLScript and Procedures
TINYINT, SMALLINT, INTEGER, BIGINT
DECIMAL(p, s), REAL, FLOAT, DOUBLE
VARCHAR, NVARCHAR, CLOB, NCLOB
VARBINARY, BLOB
DATE, TIME, TIMESTAMP
106
Scalar Data Type :
The SQLScript type system is based on the SQL-92 type system and supports
following primitive data type:
2012 SAP AG. All rights reserved. 107 2012 SAP AG. All rights reserved.
SQLScript: Data Type Extensions
SQLScript and Procedures
Table Type :
SQLScripts datatype extension also allows the definition of table types.
These table types are used to define parameters for a procedure.
A table type is created using the CREATE TYPE and delete using
DROP TYPE statement.
Syntax:
CREATE TYPE [schema.]name AS TABLE
(name1 type1 [, name2 type2,...])
DROP TYPE [schema.]name [CASCADE]
107
2012 SAP AG. All rights reserved. 108 2012 SAP AG. All rights reserved.
SQLScript: Functional Extensions
SQLScript and Procedures
Functional extension allow to describe complex dataflow logic
using side-effect free procedures.
Procedures can have multiple input parameters and output
parameters(which can be of scalar or table types).
Procedures describe a sequence of data transformations on
data passed as input and database tables.
Data transformations can be implemented as queries that
follow the SAP HANA database SQL syntax by calling other
procedures.
Read-only procedures can only call other read-only
procedures.
108
2012 SAP AG. All rights reserved. 109 2012 SAP AG. All rights reserved.
SQLScript: Procedure
SQLScript and Procedures
109
Procedure is a reusable processing block. It is implemented using
SQLScript.
DROP and CREATE statement is used to modify the definition of a
procedure.
A procedure can be created as read only(without side-effect) or read-
write.
Procedure can be implement using SQLScript, L or R language.
2012 SAP AG. All rights reserved. 110 2012 SAP AG. All rights reserved.
SQLScript: Procedure Creation using SQL editor
SQLScript and Procedures
110
Syntax:
CREATE PROCEDURE {schema.}name
{({IN|OUT|INOUT}
param_name data_type {,...})}
{LANGUAGE <LANG>} {SQL SECURITY <MODE>}
{READS SQL DATA {WITH RESULT VIEW <view_name>}} AS
BEGIN
...
END
READS SQL DATA defines a procedure as read-only.
Implementation LANGUAGE can be specified . Default is SQLScript.
WITH RESULT VIEW is used to create a column view for output parameter of
type table which can be used in SQL query.
2012 SAP AG. All rights reserved. 111 2012 SAP AG. All rights reserved.
SQLScript: Procedure Creation using Wizard
SQLScript and Procedure
Start Procedure creation wizard from context menu of package.
Provide creation parameter.
Set Access Mode for read-only
or read-write classification.
Security mode can be select by
setting the value of attribute
Run With
111
2012 SAP AG. All rights reserved. 112 2012 SAP AG. All rights reserved.
SQLScript: Procedure Creation using Wizard
SQLScript and Procedure
Define output and input parameter of procedure.
Write application logic in Script view
using SQLScript.
2012 SAP AG. All rights reserved. 113 2012 SAP AG. All rights reserved.
SQLScript: Calling a Procedure
SQLScript and Procedure
Syntax
CALL [schema.]name (param1 [, ...])
For table output parameters it is possible to either pass a table or ?.
? can be used to represent an empty parameter binding.
113
CALL - Procedure Called From Client
A procedure (or table function) can be called by a client on the outer-most
level, using any of the supported client interfaces.
2012 SAP AG. All rights reserved. 114 2012 SAP AG. All rights reserved.
SQLScript: Calling a Procedure
SQLScript and Procedure
Syntax
CALL [schema.]name (param1 [, ...]) WITH OVERVIEW
114
CALL...WITH OVERVIEW From Client
This CALL statement returns one result set that holds the information of
which table contains the result of a particular tables output variable.
This is used to populate an existing table by passing it as parameter.
When passing ? to the output parameters, temporary tables holding the
result sets will be generated.
2012 SAP AG. All rights reserved. 115 2012 SAP AG. All rights reserved.
SQLScript: Calling a Procedure
SQLScript and Procedure
Syntax
CALL [schema.]name (:in_param1, out_param [, ...])
115
CALL - Internal Procedure Call
For internal calls, i.e. calls of one procedure by another procedure, IN
variables are bound by literals or variable references, new OUT variables
are bound to the result of the call.
2012 SAP AG. All rights reserved. 116 2012 SAP AG. All rights reserved.
Calculation Engine
SQLScript and Procedures
Calculation engine is the
execution engine for
SQLScript.
SQLScript statement are
parsed into calculation model
as much as possible. The
calculation engine instantiates
a calculation model at time of
query execution.
Script Execution
Runtime
Calculation Model
(Data Flow Graph)
SQL Script
SQL Script Complier
Model Optimizer (rule based)
Intermediate
Results
Calc Engine
Operators
Database Optimizer
Model Executor
R
R R
R
Logical Execution Plan
Calc Engine
2012 SAP AG. All rights reserved. 117 2012 SAP AG. All rights reserved.
Calculation Model
SQLScript and Procedures
117
Union
R-OP R-OP
Filter
Input2 Input1
R-OP
Filter
Join
Filter
2012 SAP AG. All rights reserved. 118 2012 SAP AG. All rights reserved.
Calculation Model Example
SQLScript and Procedures
Query 5
Query 4
M_TIME_DIMENSION EPM_PROCUREMENT1
Query 2 Query 1
Query 3
2012 SAP AG. All rights reserved. 119 2012 SAP AG. All rights reserved.
SQLScript: Calculation Engine Plan Operators
SQLScript and Procedure
119
Calculation engine plan operators encapsulate data-
transformation functionality.
It is an alternative to using SQL statements as their logic is
directly implemented in the calculation engine, i.e. the
execution environment of SQLScript.
Operator has been categorized as Data Source Access and
Relational.
2012 SAP AG. All rights reserved. 120 2012 SAP AG. All rights reserved.
SQLScript: Data Source Access Operators
SQLScript and Procedure
CE_COLUMN_TABLE ("table_name"{, ["attrib_name", ...]})
Example:
ot_books1 = CE_COLUMN_TABLE("BOOKS");
ot_books2 = CE_COLUMN_TABLE("BOOKS",["TITLE","PRICE","CRCY"]);
This example only works on a column table and does not invoke the SQL processor.
It is semantically equivalent to the following:
ot_books3 = SELECT * FROM books;
ot_books4 = SELECT title, price, crcy FROM books;
120
2012 SAP AG. All rights reserved. 121 2012 SAP AG. All rights reserved.
SQLScript: Data Source Access Operators
SQLScript and Procedure
CE_JOIN_VIEW("join_view_name"{, ["attrib_name", ...]})
Example:
out = CE_JOIN_VIEW("PRODUCT_SALES",
["PRODUCT_KEY", "PRODUCT_TEXT", "SALES"]);
Retrieves the attributes PRODUCT_KEY, PRODUCT_TEXT, and SALES from the join
view PRODUCT_SALES. It is equivalent to the following SQL:
out = SELECT product_key, product_text, sales FROM product_sales;
121
2012 SAP AG. All rights reserved. 122 2012 SAP AG. All rights reserved.
SQLScript: Data Source Access Operators
SQLScript and Procedure
CE_OLAP_VIEW("OLAP_view_name"{, ["DIM", "KEY_FIG", ... ]})
Example:
out = CE_OLAP_VIEW("OLAP_view", ["DIM1", "KF"]);
Is equivalent to the following SQL:
out = select dim1, SUM(kf) FROM OLAP_view GROUP BY dim1;
122
2012 SAP AG. All rights reserved. 123 2012 SAP AG. All rights reserved.
SQLScript: Data Source Access Operators
SQLScript and Procedure
CE_CALC_VIEW ("CALC_VIEW_NAME"{, ["attrib_name", ...]})
Example:
out = CE_CALC_VIEW("_SYS_SS_CE_TESTCECTABLE_RET",
["CID", "CNAME"]);
Semantically equivalent to the following SQL:
out = SELECT cid, cname FROM "_SYS_SS_CE_TESTCECTABLE_RET";
123
2012 SAP AG. All rights reserved. 124 2012 SAP AG. All rights reserved.
CE_JOIN (:var1_table, :var2_table, [join_attr, ...]{, [attrib_name , ...]})
Example:
ot_pubs_books1 = CE_JOIN (:lt_pubs, :it_books,["PUBLISHER"]); ot_pubs_books2 =
CE_JOIN (:lt_pubs, :it_books,["PUBLISHER"],
["TITLE","NAME","PUBLISHER","YEAR"]);
This example is semantically equivalent to the following SQL but does not invoke the SQL
processor.
ot_pubs_books3 = SELECT P.publisher AS publisher, name, street,
post_code, city, country, isbn, title,
edition, year, price, crcy
FROM :lt_pubs AS P, :it_books AS B
WHERE P.publisher = B.publisher;
ot_pubs_books4 = SELECT title, name, P.publisher AS publisher, year
FROM :lt_pubs AS P, :it_books AS B
WHERE P.publisher = B.publisher;
SQLScript: Relational Operators
SQLScript and Procedure
124
2012 SAP AG. All rights reserved. 125 2012 SAP AG. All rights reserved.
CE_PROJECTION (:var_table, [param_name [AS new_param_name],...]{,[Filter]})
Example:
ot_books1 = CE_PROJECTION (:it_books,["TITLE","PRICE",
"CRCY" AS "CURRENCY"], '"PRICE" > 50');
Semantically equivalent to the following SQL:.
ot_books2= SELECT title, price, crcy AS currency
FROM :it_books WHERE price > 50;
SQLScript: Relational Operators
SQLScript and Procedure
125
2012 SAP AG. All rights reserved. 126 2012 SAP AG. All rights reserved.
CE_CALC ('<expr>', <result type>)
Example:
with_tax = CE_PROJECTION(:product, ["CID", "CNAME", "OID", "SALES",
CE_CALC('"SALES" * :vat_rate',
decimal(10,2)) AS "SALES_VAT"],
'"CNAME" = :cname');
Notice, that all columns used in the CE_CALC have to be included in the projection list.
SQLScript: Relational Operators
SQLScript and Procedure
126
2012 SAP AG. All rights reserved. 127 2012 SAP AG. All rights reserved.
CE_AGGREGATION (:var_table, [aggregate ("column") {AS "renamed_col"}]
{,["column", ...]});
Example:
ot_books1 = CE_AGGREGATION (:it_books,
[COUNT ("PUBLISHER") AS "CNT"], ["YEAR"]);
Semantically equivalent to the following SQL:
ot_books2 = SELECT COUNT (publisher) AS cnt, year
FROM :it_books GROUP BY year;
SQLScript: Relational Operators
SQLScript and Procedure
127
2012 SAP AG. All rights reserved. 128 2012 SAP AG. All rights reserved.
CE_UNION_ALL (:var_table1, :var_table2)
Example:
ot_all_books1 = CE_UNION_ALL (:lt_books, :it_audiobooks);
Semantically equivalent to the following SQL:
ot_all_books2 = SELECT * FROM :lt_books
UNION ALL
SELECT * FROM :it_audiobooks;
SQLScript: Relational Operators
SQLScript and Procedure
128
2012 SAP AG. All rights reserved. 129 2012 SAP AG. All rights reserved.
SQLScript: Control statement
SQLScript and Procedure
IF <bool-expr1>
THEN
{then-stmts1}
{ELSEIF <bool-expr2>
THEN
{then-stmts2}}
{ELSE
{else-stmts3}}
END IF
Example:
SELECT count(*) INTO found
FROM books WHERE isbn = :v_isbn;
IF :found IS NULL THEN
CALL ins_msg_proc
('result of count(*) cannot be NULL');
ELSE
CALL ins_msg_proc
('result of count(*) not NULL - as expected');
END IF;
129
2012 SAP AG. All rights reserved. 130 2012 SAP AG. All rights reserved.
SQLScript: Control statement
SQLScript and Procedure
WHILE <bool-stmt> DO
{stmts}
END WHILE
FOR <loop-var> IN {REVERSE} <start> .. <end> DO
{stmts}
END FOR
130
2012 SAP AG. All rights reserved. 131 2012 SAP AG. All rights reserved.
SQLScript: Dynamic SQL
SQLScript and Procedure
Dynamic SQL statement is used to construct SQL statements at runtime
in a procedure.
Dynamic SQL allows to use variables where they might not be supported
in SQLScript. It provides more flexibility in creating SQL statements.
Optimization of dynamic SQL statement is limited.
It is not possible to bind result of a dynamic SQL statement to a
SQLScript variable.
Dynamic SQL is prone to SQL injection.
EXEC '<sql-statement> is used to construct dynamic SQL.
131
EXEC '<sql-statement>'
2012 SAP AG. All rights reserved. 132 2012 SAP AG. All rights reserved.
Summary
Approaching SAP HANA Modeling
132
Explain SQLScript and SQLScript extensions
SQLScript implementation logic
Create and call Procedure
Explain calculation engine and calculation model
Explain functionality of Calculation engine operators
2012 SAP AG. All rights reserved. 133 2012 SAP AG. All rights reserved.
Creating Restricted & Calculated Measures
Creating Attribute Views
Using Hierarchies
SAP HANA SQL - Introduction
Using Filter Operations
Using Variables
SQLScript and Procedures
Using Currency Conversion
Creating Calculation Views
Unit 3: Advanced Modeling
2012 SAP AG. All rights reserved. 134 2012 SAP AG. All rights reserved.
Objectives
Using Currency Conversion
Understand Currency Conversion in SAP HANA
Apply Currency Conversion in Analytic Views
Leverage Fixed Currencies
Leverage Source Currency from Attributes
Create Target Currency Variables
Use Currency conversion in Calculation Views
2012 SAP AG. All rights reserved. 135 2012 SAP AG. All rights reserved.
Overview
Using Currency Conversion
Currency Conversion in SAP HANA
Currency Conversion in Analytic Views
Using Fixed Currencies
Using Source Currency from Attributes
Creating Target Currency Variables
Currency Conversion in Calculation Views
135
2012 SAP AG. All rights reserved. 136 2012 SAP AG. All rights reserved.
Currency Conversion
Using Currency Conversion
As most frontend tools do not allow
defining or switching reporting
currency in the UI, and as there might
not be such information in master data,
we have to convert the possibly many
monetary document currencies into
just a few.
SAP HANA has the necessary
functions needed to achieve currency
conversion during data modeling.
136
2012 SAP AG. All rights reserved. 137 2012 SAP AG. All rights reserved.
Currency Conversion
Using Currency Conversion
As currency exchange rates fluctuate
constantly in the global markets, when
converting it is necessary not only to
define the source and target currencies
when converting, but also to define the
time when currency conversion should
take place. Examples could be:
Billing Date
Posting Date
Financial Year End
Todays Date
137
2012 SAP AG. All rights reserved. 138 2012 SAP AG. All rights reserved.
Currency Conversion in SAP HANA
Using Currency Conversion
The preferred way to define currency conversion for measures is to model in an
Analytic View.
138
2012 SAP AG. All rights reserved. 139 2012 SAP AG. All rights reserved.
Currency Conversion in SAP HANA
Using Currency Conversion
But still, sometimes due to the constraints in the master data, or because of the
complexity of the reporting requirements, it might be necessary to model the
conversion within a Calculation View.
139
2012 SAP AG. All rights reserved. 140 2012 SAP AG. All rights reserved.
Currency Conversion in SAP HANA
Using Currency Conversion
Table Name Description
TCURR Exchange Rates
TCURV Exchange rate types for currency translation
TCURF Conversion Factors
TCURN Quotations
TCURX Currency Decimals
The following standard SAP tables need to be included in the SYSTEM schema or
other specified schema, as they are used for currency conversion.
What we need are some of the TCUR* tables. They must be replicated so that the
conversions are working correctly.
140
2012 SAP AG. All rights reserved. 141 2012 SAP AG. All rights reserved.
Currency Conversion in Analytic Views
Using Currency Conversion
Create a Measure
Define it as
Measure Type:
Amount with
Currency
Enable for
Conversion
This is option gives
us the possibility to
convert the currency.
Select Target
Currency
This is the
currency we
want to convert
to.
Define Source Currency
This is the currency we want to
convert from.
It is the currency type that our
measure is stored in.
Select Date of Conversion
and Exchange Type
Date of Conversion will use the
exchange rate of the defined
date.
Exchange Type is the type of
exchange rate we want to use.
Process Flow - Currency Conversion in Analytic Views
141
2012 SAP AG. All rights reserved. 142 2012 SAP AG. All rights reserved.
Currency Conversion in Analytic Views
Using Currency Conversion
Analytic View
Create a
Measure
Enable for
Conversion
Target
Currency
Source
Currency
Date of
Conversion
and
Exchange
Type
A measure in an Analytic
View can be defined with
the Measure Type:
Amount with Currency
This is the necessary
Measure Type for the
method.
142
2012 SAP AG. All rights reserved. 143 2012 SAP AG. All rights reserved.
Currency Conversion in Analytic Views
Using Currency Conversion
Enabling the Measure for
conversion releases
further options in the
Measure definition in
order to complete the
conversion as required.
143
Create a
Measure
Enable for
Conversion
Target
Currency
Source
Currency
Date of
Conversion
and
Exchange
Type
2012 SAP AG. All rights reserved. 144 2012 SAP AG. All rights reserved.
Currency Conversion in Analytic Views
Using Currency Conversion
We also have the option of creating the Target
Currency not based on a Fixed Currency, but
rather based on an Attribute or Variable.
Selecting the Currency
brings up the Currency
Dialog where the Target
Currency can be defined.
A Fixed Currency will
convert the Source
Currency into a single
currency.
144
Create a
Measure
Enable for
Conversion
Target
Currency
Source
Currency
Date of
Conversion
and
Exchange
Type
2012 SAP AG. All rights reserved. 145 2012 SAP AG. All rights reserved.
Currency Conversion in Analytic Views
Using Currency Conversion
If we know the base Currency we can set it as
a Fixed Type. If it varies we can set it as an
Attribute type and it will change based on an
Attribute.
Clicking on the Source
Currency, once again
brings up the Currency
Dialog, this time to set
the Source Currency.
145
Create a
Measure
Enable for
Conversion
Target
Currency
Source
Currency
Date of
Conversion
and
Exchange
Type
2012 SAP AG. All rights reserved. 146 2012 SAP AG. All rights reserved.
Currency Conversion in Analytic Views
Using Currency Conversion
The Exchange Type is the
type of Exchange Rate we
want to use, as supplied from
our SAP TCUR* base tables.
The Date Mapping defines
the date when we want the
currency conversion to occur,
based on either a Fixed date,
an Attribute or a Variable.
146
Create a
Measure
Enable for
Conversion
Target
Currency
Source
Currency
Date of
Conversion
and
Exchange
Type
2012 SAP AG. All rights reserved. 147 2012 SAP AG. All rights reserved.
Leverage Fixed Currencies
Using Currency Conversion
Sales
Order
Amount
GBP
001 2 500
002 10 000
003 3 000
004 1 650
Sales
Order
Amount
USD
001 $3 250
002 $13 000
003 $3 900
004 $2 145
When the source, target or both the source and target currencies are known,
it is beneficial to set the currency of either or both types to Fixed.
Using this method all lines for the measure in the Analytic View will be
converted using the same currency.
147
2012 SAP AG. All rights reserved. 148 2012 SAP AG. All rights reserved.
Leverage Fixed Currencies
Using Currency Conversion
To achieve a conversion
using fixed currencies we set
the Currency Type as Fixed
and define the currencies to
the appropriate source and
target currencies.
This way we achieve a one-
to-one conversion.
148
2012 SAP AG. All rights reserved. 149 2012 SAP AG. All rights reserved.
Sales Order Currency Amount
001 EUR 2 500
002 JPY 100 000
003 CHF CHF 3 000
004 SEK 165 000 kr
Leverage Source Currency from Attribute
Using Currency Conversion
149
There can sometimes be instances of
master data where the base currencies
vary across the table.
On one line you might find for example
a sales order with a value in Euro, on
another line you might find a different
value expressed in Japanese Yen etc.
Summing up these different currencies
would give us a useless value.
2012 SAP AG. All rights reserved. 150 2012 SAP AG. All rights reserved.
Leverage Source Currency from Attribute
Using Currency Conversion
Sales
Order
Amount
USD
001 $3 250
002 $13 000
003 $3 900
004 $2 145
Sales
Order
Currency Amount
001 EUR 2 500
002 JPY 100 000
003 CHF CHF 3 000
004 SEK 165 000 kr
Source Currency
Attribute
150
With multiple currencies in the master data we are not able to set the source
currency to a single fixed type.
Instead, in order to convert the currency, we will need to define the source
currency based on an attribute in the master data
2012 SAP AG. All rights reserved. 151 2012 SAP AG. All rights reserved.
Leverage Source Currency from Attribute
Using Currency Conversion
When using an Attribute Type to define the Source Currency we set the
attribute that contains the currency code to be used for the conversion to the
target currency.
This way SAP HANA knows which currency exchange rate to use for each
individual line.
151
2012 SAP AG. All rights reserved. 152 2012 SAP AG. All rights reserved.
Use Currency Conversion in Analytic Views
Using Currency Conversion
Enable for decimal shifts
This option is to be used when you want to
shift the decimal separator to the
appropriate place according to the currency
exchange rate data available in the master
data tables.
Upon Conversion Failure
This selection gives you the opportunity to
define how SAP HANA should deal with
conversion failures. You can opt to either:
Fail / Set to NULL / Ignore
SAP HANA includes some further functionality to ease currency conversion.
152
2012 SAP AG. All rights reserved. 153 2012 SAP AG. All rights reserved.
Use Currency Conversion in Analytic Views
Using Currency Conversion
To summarize currency conversion in Analytic
views, you can set:
Decimal Shift Yes/No
Target Currency Fixed or Attribute Based
Source Currency Fixed or Attribute Based
Exchange Type When you have multiple
Exchange Rates, you specify the one to use
Exchange Date The date when conversion
should be performed
Upon Conversion Failure: Fail/Set to
NULL/Ignore
153
2012 SAP AG. All rights reserved. 154 2012 SAP AG. All rights reserved.
Use Currency Conversion in Analytic Views
Using Currency Conversion
There can however be circumstances where
the Target Currency options Fixed or
Attribute-based are not sufficient.
You might instead want the option to let the
reporting user choose the currency that the
measure should be displayed in.
This will be dealt with in the following topic,
Create Target Currency Variable.
154
2012 SAP AG. All rights reserved. 155 2012 SAP AG. All rights reserved.
Create Target Currency Variable
Using Currency Conversion
To enable a prompt where the reporting user
can specify the target currency of the
measure, we first need to create a new
Variable.
The Variable should be defined as:
Type: Currency
Data Type: VARCHAR, Length: 5
155
2012 SAP AG. All rights reserved. 156 2012 SAP AG. All rights reserved.
Create Target Currency Variable
Using Currency Conversion
After the variable has been defined, you can then set the Target Currency to be
expressed not as a Fixed or Attribute Type, but rather as a Variable.
The variable created can then be selected as the Currency Type.
156
2012 SAP AG. All rights reserved. 157 2012 SAP AG. All rights reserved.
Create Target Currency Variable
Using Currency Conversion
When you later view the data in the Analytic View, you get the option of
choosing the measure target currency based on the variable that you have
created.
157
2012 SAP AG. All rights reserved. 158 2012 SAP AG. All rights reserved.
Use Currency conversion in Calculation Views
Using Currency Conversion
Calculation View
It is also possible to perform currency
conversions in a Calculation View.
The method used to convert currencies
differs from how it is done in Analytic
Views.
Rather than defining the conversion rules
graphically as done in the Analytic Views,
the definitions will need to be written by
the modeler.
158
2012 SAP AG. All rights reserved. 159 2012 SAP AG. All rights reserved.
Use Currency conversion in Calculation Views
Using Currency Conversion
The function we want to use to perform currency conversion in Calculation
Views is called CE_CONVERSION.
When calling CE_CONVERSION you specify the input table (in most cases
an Analytic view), and then define how you want the currency conversion
done.
159
2012 SAP AG. All rights reserved. 160 2012 SAP AG. All rights reserved.
Use Currency conversion in Calculation Views
Using Currency Conversion
Key Values Default Meaning
'error_ handling'
'fail on error', 'set to null',
'keep unconverted'
'fail on
error'
describe reaction if a rate could not be determined for a row
'client' any none define the client number used for currency conversion
'family' 'currency', 'unit' none describe the family of the conversion to be used
'method' 'ERP' none describe the conversion method to be used
'conversion_type' any none define the type of exchange rate used for currency conversion
'source_unit' any none define the default source unit for any kind of conversion
'target_unit' any none define the default target unit for any kind of conversion
'reference _date' any none define the default reference date for any kind of conversion
'schema' any
current
schema
define the default schema in which the conversion tables should be
looked up
'output'
combinations of 'input',
'unconverted', 'converted',
'passed_through',
'output_unit', 'source_unit',
'target_unit', 'reference_date'
'converted,
passed
_through,
output_unit'
define which attributes should be included in the output
Please note the above is not a complete list, there are further optional arguments if required. See SAP HANA
reference manual.
The different argument definitions necessary when using CE_CONVERSION are similar
to what needs to be defined when performing currency conversions graphically in an
Analytic View.
160
2012 SAP AG. All rights reserved. 161 2012 SAP AG. All rights reserved.
Use Currency conversion in Calculation Views
Using Currency Conversion
Please note the above is pseudo-code and does not run unmodified.
Define the input table
Perform the Conversion
using the
CE_CONVERSION
function
Project the results
161
A simple Calculation View with the sole purpose of converting a measurement into
a different currency could be written in three steps:
2012 SAP AG. All rights reserved. 162 2012 SAP AG. All rights reserved.
Objectives
Using Currency Conversion
Understand Currency Conversion in SAP HANA
Apply Currency Conversion in Analytic Views
Leverage Fixed Currencies
Leverage Source Currency from Attributes
Create Target Currency Variables
Use Currency conversion in Calculation Views
162
2012 SAP AG. All rights reserved. 1
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
Using Full text Search
Full text Search Overview
Data Types and Full text Indexes
Unit 4: Fulltext Search
2012 SAP AG. All rights reserved. 3
At the end of this Lesson you will be able to:
Objectives
Fulltext Search Overview
Understand the Fulltext Search capabilities of SAP HANA
Understand the benefits of Fulltext Search
Understand how the text searching processes are invoked
Understand when to use Fuzzy Search
3
2012 SAP AG. All rights reserved. 4
This module covers the following topics:
Overview
Fulltext Search Overview
Fulltext Search capabilities of SAP HANA
Fulltext Search benefits
Text Searching Engines
Fuzzy Search Introduction
4
2012 SAP AG. All rights reserved. 5
What is Fulltext Search
Fulltext Search Overview
5
The Fulltext Search capabilities of HANA
helps speed up search capabilities within
large amounts of text data significantly.
Fuzzy Search functionality enables finding
strings that match a pattern approximately
(rather than exactly), both finding
approximate substring matches inside a
given string and finding dictionary strings that
match the pattern approximately.
Text Analysis scripts provides additional
possibilities of analysing the strings or large
text columns.
2012 SAP AG. All rights reserved. 6
What is Fuzzy Search
Fulltext Search Overview
6
Fuzzy Search is a fast and fault-tolerant search feature for SAP HANA. The term
fault-tolerant search means that a database query returns records even if the
search term (the user input) contains additional or missing characters or other
types of spelling error. Its applications can be for example:
Fault-tolerant search in text columns (for example, html or pdf): Search for
documents on 'Driethanolamyn' and find all documents that contain the term
'Triethanolamine'.
Fault-tolerant search in structured database content: Search for a product
called 'coffe krisp biscuit' and find 'Toffee Crisp Biscuits'.
Fault-tolerant check for duplicate records: Before creating a new customer
record in a CRM system, search for similar customer records and verify that
there are no duplicates already stored in the system. When, for example,
creating a new record 'SAB Aktiengesellschaft & Co KG Deutschl.' in
'Wahldorf', the system shall bring up 'SAP Deutschland AG & Co. KG' in
'Walldorf' as a possible duplicate.
2012 SAP AG. All rights reserved. 7
SAP HANA Fulltext Search Aids
Fulltext Search Overview
7
HANA provides the following to aid
Fulltext Search:
Fulltext and Fuzzy Search Studio
Modeler and SQL Script
Enhancement
Python based Text Analysis script sets.
Search User Interface sample
application
2012 SAP AG. All rights reserved. 8
Fulltext Search Benefits
Fulltext Search Overview
8
The benefits include:
Exploit unstructered content without
additional costs
Less data duplication and movement
leverage one infrastructure for
analytical and search workloads
Easy-to-use modeling tools use
HANA Studio to create search
models
Build Search Applications qiuckly UI
building blocks provided
2012 SAP AG. All rights reserved. 9 2012 SAP AG. All rights reserved.
Fulltext Search Processes
Fulltext Search Overview
9
Fulltext Search functions are invoked by a dedidated process
Search
Engine
ETL/rep
In-Memory
Column
Store
Calc
Engine Models
Text
Processor
Metadata
Repository
Interfaces, Services
U
I
S
A
P

H
A
N
A
Store
Source
UI
Engine
2012 SAP AG. All rights reserved. 10 2012 SAP AG. All rights reserved.
Fulltext Search Processes
Fulltext Search Overview
10
To enable Fulltext Search, Search Models are created in HANA Studio by the
modeller.
Information Access Services
Modeler
HANA Studio
UI
components
Metadata Column Store
Search
Model
Tables
Text Processor
Linguistic
Processing
Metadata
Fuzzy Search
Search Engine
Ranking Snippets
Search Suggestions
U
I
H
A
N
A
2012 SAP AG. All rights reserved. 11 2012 SAP AG. All rights reserved.
Fulltext Search Processes
Fulltext Search Overview
11 11
Information Access Services
Modeler
HANA Studio
UI
components
Metadata Column Store
Search
Model
Tables
Text Processor
Linguistic
Processing
Metadata
Fuzzy Search
Search Engine
Ranking Snippets
Search Suggestions
U
I
H
A
N
A
During data access through Information Access Services, Fuzzy Search queries are
routed to the Search Engine, whilst Linguistic Processing is handled by the Text
Processor.
2012 SAP AG. All rights reserved. 12 2012 SAP AG. All rights reserved.
Fulltext Search UI toolkit
Fulltext Search Overview
12
The Fulltext Search UI toolkit is provided with HANA SP4, and provides User
Interface building blocks for developing search-based applications on SAP HANA.
The toolkit is based on HTML5 and Javascript.
2012 SAP AG. All rights reserved. 13 2012 SAP AG. All rights reserved.
Text Analysis
Fulltext Search Overview
13
The Text Analysis enablement of SAP HANA allows you to make use of these
unique capabilities in the domain of unstructured data as well.
The text analysis is a set of Python based scripts, that can be installed and it
can then extract entities such as persons, products, places, and more from
documents and thus enrich the set of structured information in SAP HANA.
These additional attributes enable improved analytics and search.
The text analysis provides a vast number of possible entity types and analysis
rules for many industries in 20 languages, they provide a rich standard set of
dictionaries and rules for identifying and extracting entities from any
business text. The standard covers common entities such as organizations,
persons, countries, dates, measures, and many more. The standard also
contains specialized extraction content such as Marketing (voice of the
customer) or Public Sector.
2012 SAP AG. All rights reserved. 14
You should now be able to:
Objectives
Fulltext Search Overview
14
Understand the Fulltext Search capabilities of SAP
HANA
Understand the benefits of Fulltext Search
Understand how the text searching processes are
invoked
Understand when to use Fuzzy Search
Using Fulltext Search
Fulltext Search Overview
Data Types and Fulltext Indexes
Unit 4: Fulltext Search
2012 SAP AG. All rights reserved. 16
At the end of this Lesson you will be able to:
Objectives
Data Types and Fulltext Indexes
Understand the Fulltext Search usage for different data types
Understand how to create columns that enable Fulltext Search
Understand how to enable HANA Studio for Fulltext Modeling
16
2012 SAP AG. All rights reserved. 17
This module covers the following topics:
Overview
Data Types and Fulltext Indexes
Fulltext Search usage for different data types
Enabling columns for Fulltext search
Enabling Hana Studio for Fulltext modeling
17
2012 SAP AG. All rights reserved. 18 2012 SAP AG. All rights reserved.
Supported Data Types
Data Types and Fulltext Indexes
18
Fuzzy search works out-of-the-box on the
following column store data types:
TEXT
SHORTTEXT
VARCHAR
NVARCHAR
DATE
All data types with a full-text index
2012 SAP AG. All rights reserved. 19 2012 SAP AG. All rights reserved.
Full Text Indexes
Data Types and Fulltext Indexes
19
It is possible to speed up the fuzzy search by creating
additional data structures, which are used for faster
calculation of the fuzzy score. These data structures exist in
the memory only, so no additional disk space is required.
You should enable the fast fuzzy search structures for all
database columns that have a high load of fuzzy searches,
and for all database columns that are used in performance-
critical queries, to get the best response times possible.
The additional data structures increase the total memory
footprint of the loaded table.
X
I
N
D
E
2012 SAP AG. All rights reserved. 20 2012 SAP AG. All rights reserved.
Full Text Indexes
Data Types and Fulltext Indexes
20
For data types TEXT or SHORT TEXT the index creation is
done during table creation; for data types VARCHAR,
NVARCHAR or CLOB an index has to be created manually
post table creation.
Note that full text indexes can not be created for DATE data
type columns.
X
I
N
D
E
2012 SAP AG. All rights reserved. 21 2012 SAP AG. All rights reserved.
Full Text Indexes
Data Types and Fulltext Indexes
21
The syntax used to enable Full Text Indexes on TEXT or
SHORTTEXT is the following:
CREATE COLUMN TABLE mytable
(
id INTEGER PRIMARY KEY,
col1 SHORTTEXT(100) FUZZY SEARCH INDEX ON
);
It is currently not possible to change these settings at a
later point in time by using the ALTER TABLE command.
X
I
N
D
E
2012 SAP AG. All rights reserved. 22 2012 SAP AG. All rights reserved.
Full Text Indexes
Data Types and Fulltext Indexes
22
The syntax used to enable Full Text Indexes on VARCHAR,
NVARCHAR or CLOB is the following:
CREATE COLUMN TABLE mytable
(
col1 NVARCHAR(2000)
);
CREATE FULLTEXT INDEX myindex ON mytable(col1)
FUZZY SEARCH INDEX ON
;
This can be changed at a later point in time by using the
ALTER FULLTEXT INDEX command.
X
I
N
D
E
2012 SAP AG. All rights reserved. 23 2012 SAP AG. All rights reserved.
Fuzzy Search SQL Syntax
Data Types and Fulltext Indexes
23
In order to use the Studio for
Search modeling, you first
enable Search Options in the
preferences of the Studio
under:
Modeler -> Search Options
2012 SAP AG. All rights reserved. 24 2012 SAP AG. All rights reserved.
Fuzzy Search SQL Syntax
Data Types and Fulltext Indexes
24
You will then have
access to a new tab
called Information
Access in the
properties of created
Attributes.
2012 SAP AG. All rights reserved. 25
You should now be able to:
Objectives
Data Types and Fulltext Indexes
25
Understand the Fulltext Search usage for different
data types
Understand how to create columns that enable Fulltext
Search
Understand how to enable HANA Studio for Fulltext
Modeling
Using Fulltext Search
Fulltext Search Overview
Data Types and Fulltext Indexes
Unit 4: Fulltext Search
2012 SAP AG. All rights reserved. 27
At the end of this Lesson you will be able to:
Objectives
Using Fulltext Search
Know how to use Fulltext Search
Know how to use Fuzzy Search
Understand Fuzzy Search relevance scoring
Know how to use Freestyle Search
27
2012 SAP AG. All rights reserved. 28
This module covers the following topics:
Overview
Using Fulltext Search
Fulltext Search
Fuzzy Search
Fuzzy Search Relevance Scoring
Freestyle Search
28
2012 SAP AG. All rights reserved. 29 2012 SAP AG. All rights reserved.
Fulltext Search SQL Syntax
Using Fulltext Search
29
You call Fulltext Search by using the CONTAINS()
function in the WHERE-clause of a SELECT statement.
Without the Fuzzy option the search will only return
results that contain the exact phrase searched for.
SELECT
SCORE() AS score, *
FROM
documents
WHERE
CONTAINS(doc_content, 'Driethanolamyn')
ORDER BY
score DESC;
2012 SAP AG. All rights reserved. 30 2012 SAP AG. All rights reserved.
Fulltext Search SQL Syntax
Using Fulltext Search
30
A fuzzy search is an alternative to a non-fault-
tolerant SQL statement like the example below,
which would not return any results when there are
spelling errors.
SELECT
...
FROM
documents
WHERE
doc_content LIKE '% Driethanolamyn %' ...
2012 SAP AG. All rights reserved. 31 2012 SAP AG. All rights reserved.
Fuzzy Search Relevance Score
Using Fulltext Search
31
The fuzzy search algorithm calculates a
fuzzy score for each string comparison. The
higher the score, the more similar the strings
are. A score of 1.0 means the strings are
identical. A score of 0.0 means the strings
have nothing in common.
You can request the score in the SELECT
statement by using the SCORE() function.
You can sort the results of a query by score
in descending order to get the best records
first (the best record is the record that is
most similar to the user input). When a fuzzy
search of multiple columns is used in a
SELECT statement, the score is returned as
an average of the scores of all columns
used.
0.0
1.0
2012 SAP AG. All rights reserved. 32 2012 SAP AG. All rights reserved.
String Type Fuzzy Search
Using Fulltext Search
32
String Type Search
String types support a basic fuzzy string
search. The values of a column are
compared with the user input, using the
fault-tolerant fuzzy string comparison.
When working with string types, the fuzzy
string comparison always compares the full
strings. If searching with 'SAP', for example,
a record like 'SAP Deutschland AG & Co.
KG' gets a very low score, because only a
very small part of the string is equal (3 of 27
characters match).
SAP
SAP
Deutschaland
AG & Co
~
2012 SAP AG. All rights reserved. 33 2012 SAP AG. All rights reserved.
Text Type Fuzzy Search
Using Fulltext Search
33
Text Type Search
Text types support a more sophisticated
kind of fuzzy search. Texts are tokenized
(split into terms) and the fuzzy comparison is
done term by term.
For example, when searching with 'SAP', a
record like 'SAP Deutschland AG & Co. KG'
gets a high score, because the term 'SAP'
exists in both texts. A record like
'SAPPHIRE NOW Orlando' gets a lower
score, because 'SAP' is only a part of the
longer term 'SAPPHIRE' (3 of 8 characters
match).
SAP
SAPPHIRE
NOW Orlando
~
2012 SAP AG. All rights reserved. 34 2012 SAP AG. All rights reserved.
Fuzzy Search SQL Syntax
Using Fulltext Search
34
You can call the fuzzy search by using the CONTAINS() function with the
FUZZY() option in the WHERE-clause of a SELECT statement.
SELECT
SCORE() AS score, *
FROM
documents
WHERE
CONTAINS(doc_content, 'Driethanolamyn', FUZZY(0.6))
ORDER BY
score DESC;
Optionally, the fuzziness threshold can manually be
set when making the FUZZY() call.
If set to for example 0.6, no matches lower than 0.6
will be returned. Default is 0.8.
2012 SAP AG. All rights reserved. 35 2012 SAP AG. All rights reserved.
Freestyle Search SQL Syntax
Using Fulltext Search
35
If you want HANA to search for occurrences of your search word or
phrase in multiple columns, you can perform a Freestyle Search.
This type of search will go through any columns in the table that has
Freestyle Search enabled.
SELECT
SCORE() AS score, *
FROM
documents
WHERE
CONTAINS(*, 'Driethanolamyn', FUZZY)
ORDER BY
score DESC;
Replacing the column
name with a star
2012 SAP AG. All rights reserved. 36
You should now be able to:
Objectives
Data Types and Fulltext Indexes
36
Know how to use Fulltext Search
Know how to use Fuzzy Search
Understand Fuzzy Search relevance scoring
Know how to use Freestyle Search
2012 SAP AG. All rights reserved. 1
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
2012 SAP AG. All rights reserved. 2
At the end of this Lesson you will be able to:
Objectives
Unit 5 Processing Information Objects
Explain how to validate models
Explain how to compare versions of information objects
Explain how to check model references
Explain how to generate auto documentation
2012 SAP AG. All rights reserved. 3
Model Validation
Processing Information Objects
Create Data Model
Attribute Views
Analytical Views
Calculation Views
Validate Data
Model
Activate Data
Model
Set preferences for validation rules
2012 SAP AG. All rights reserved. 4
Set Preferences for Validation Rules
Processing Information Objects
In the SAP HANA STUDIO, go to Windows -> Preferences
And then select Modeler -> Validation Rules
2012 SAP AG. All rights reserved. 5
Set Preferences for Validation Rules
Processing Information Objects
You can select
precisely which
rules are applied
during the
validation of the
Information
Objects
At any moment, you can restore default settings.
2012 SAP AG. All rights reserved. 6
Execute Validation Rules
Processing Information Objects
To validate Information Objects, you can use the button
Validate or right click directly on the object.
You can also select several
Information Objects.
2012 SAP AG. All rights reserved. 7
Execute Validation Rules
Processing Information Objects
In Job Log, in menu Current, you
can see the job detail by double
clicking on it.
In menu History, all job logs
appear for a period set in
Preferences.
2012 SAP AG. All rights reserved. 8
Object Versions
Processing Information Objects
Creation of the
view, the view is
inactive
Validation, Save
and Activation
Validation, Save
and Activation
Modification
and Save
Activation of
the view, the
view is active
Modification of
the view, the
view is inactive
Activation of
the view, the
view is active
View
Inactive
View
Active
View
Inactive
View
Active
2012 SAP AG. All rights reserved. 9
Object Versions Comparing versions
Processing Information Objects
Modification of the View Active by Adding fields
View
Inactive
View
Active
2012 SAP AG. All rights reserved. 10
Object Versions View Version History
Processing Information Objects
Only Active Versions are displayed.
Name of the user activating the view, Activation
Date and Period from the last activation are
available in Version History
2012 SAP AG. All rights reserved. 11
References- Checking Model References
Processing Information Objects
In the modeler, it is possible to
check where are used different
Information objects in the schema.
This function could be very helpful
to study the impacts of changes in
the data model.
Select an object, do a right click
and select Where Used
function.
2012 SAP AG. All rights reserved. 12
References- Checking Model References
Processing Information Objects
In the Where-Used List , the number
of usages of the object is available.
Thereby, Type , Name and
Package of each object which are
currently used for the selected object
are displayed.
2012 SAP AG. All rights reserved. 13
Auto Documentation
Processing Information Objects
It is possible to generate automatically documentation about the data model in
HANA. These documents could provide a list of all objects containing in a
package or details on previous selected objects.
You can generate Auto Documentation
with a right click on an Information
Objects or directly with the button
below.
2012 SAP AG. All rights reserved. 14
Auto Documentation Select Document Type
Processing Information Objects
Two document types are
available :
Model Details (display each
particularity of an Information
Objects)
Model List (display a list of each
component of the package)
2012 SAP AG. All rights reserved. 15
Auto Documentation Add Objects to Target List
Processing Information Objects
All Information Objects
in the Content are
available.
You have to select one
or several objects and
use the Add button.
Use the button
Remove to cancel
the selection.
You can add objects
from different
packages in the same
generated document.
2012 SAP AG. All rights reserved. 16
Auto Documentation
Select Export Type & Save to Location
Processing Information Objects
Unfortunately, it is not
possible yet to change
the export file type.
Only .pdf type is
supported for the
moment.
Then, choose an
target emplacement to
save the generated
documents.
2012 SAP AG. All rights reserved. 17
You should now be able to:
Summary
Processing Information Objects
Explain how to validate models
Explain how to compare versions of information objects
Explain how to check model references
Explain how to generate auto documentation
2012 SAP AG. All rights reserved. 1
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
2012 SAP AG. All rights reserved. 2
At the end of this Lesson you will be able to:
Objectives
Managing Modeling Content
Explain how to manage schemas
Explain how to import and export data models
Explain Translating metadata texts
2012 SAP AG. All rights reserved. 3
Schemas Creating Schemas
Managing Modeling Content
You create schemas to group the tables. For import you need to create
the schema where all the tables are imported.
Schemas are created with a SQL Script statement.
SQL Syntax : CREATE SCHEMA schema_name [OWNED BY name]
Parameters : OWNED BY Specifies the name of the schema owner.
Description : The CREATE SCHEMA statement creates a schema in the
current database.
2012 SAP AG. All rights reserved. 4
Schemas Managing Schemas Mapping
Managing Modeling Content
You use this procedure to map the logical schemas with the physical schemas
while transferring information objects from a source system to target in case of
SAP shipped content.
You can define different schema mappings in the same time.
2012 SAP AG. All rights reserved. 5
Schemas Managing Schemas Mapping
Managing Modeling Content
SYSTEM S1
SCHEMA_S1.TABLE1
SCHEMA_S1.TABLE1
SYSTEM S2
SCHEMA_S2.TABLE1
Import TABLE1 into
SYSTEM S2 and
modify SCHEMA_S1
into SCHEMA_S2
Export TABLE1
from SYSTEM S1
with SCHEMA_S1
2012 SAP AG. All rights reserved. 6
Delivery units, packages and models in
perspective
Delivery Unit
Package 2
Package 1
Transport
to another
HANA
system
Models
and
objects
Models
and
objects
2012 SAP AG. All rights reserved. 7
Import & Export
Managing Modeling Content
SYSTEM
S1
SYSTEM
S2
Exporting
Models
(Client or
Server)
Importing
Models
(Client or
Server)
You can import models from your local system or from a server.
Procedure :
Creating
Delivery
Unit
2012 SAP AG. All rights reserved. 8
HANA Content Transport Capabilities
SAP Solution Manager
CTS+
Export DIR
Manual
Source
Export DIR
Target
CTS+
CTS+
In context of Data Marts:
2-step integration into CTS+ (lose coupling):
Manual preparation (server-side export)
Automated transport and deployment in target
system via CTS+
Potential for ABAP-based new applications (HPAs)
TLOGO-based transport
Encapsulating SAP HANA content in ABAP
objects
(allows transport SAP HANA content with
application code though standard CTS
mechanisms)
In context of SAP NW 7.3 BW, powered by
SAP HANA
Leverage existing transport functionality
2012 SAP AG. All rights reserved. 9
Import & Export Create Delivery Unit
Managing Modeling Content
From the Quick Launch
tab page, choose
Delivery Units.. and
follow the steps given
below.
You use a Delivery Unit to create a group of transportable objects for content
delivery and to export information models from source system to target server.
2012 SAP AG. All rights reserved. 10
Import & Export Create Delivery Unit
Managing Modeling Content
From the Delivery Units
dialog box, choose
create.
You need to associate
packages with delivery
units. This is required
when you export
models.
2012 SAP AG. All rights reserved. 11
Import & Export Create Delivery Unit
Managing Modeling Content
Enter the delivery unit name.
Enter the responsible user.
In the Version field, enter the delivery
unit version.
Enter the support package version of
the delivery unit.
Enter the patch version of the
delivery unit.
2012 SAP AG. All rights reserved. 12
Import & Export Export Model to Server
Managing Modeling Content
You use this procedure to
export models.
Prerequisites :
You have created a
delivery unit.
2012 SAP AG. All rights reserved. 13
Import & Export Export Model to Client or Server
Managing Modeling Content
Select the delivery unit.
Then choose whether to export on the
server or the client and click on Next
button.
2012 SAP AG. All rights reserved. 14
Import & Export Import Model from Server
Managing Modeling Content
You use this procedure to
import models from the
server.
2012 SAP AG. All rights reserved. 15
Import & Export Import Models from Server
Managing Modeling Content
Select the system.
Select the file repository on the server where
models have been exported.
Then select models you want to import.
Define parameters as Overwritten inactive
versions and Activate objects and then
click on Finish button
2012 SAP AG. All rights reserved. 16
Import & Export SAP Support Mode
Managing Modeling Content
In order to ease communication when
working together with SAP to gain
support for Information Models, the
export tool provides a method to
export Information Objects to the
server in a mode named SAP
Support Mode.
Only active objects can be exported
in this mode.
These will be exported to the server
and the file(s) can then be sent to
SAP support for troubleshooting
purposes.
2012 SAP AG. All rights reserved. 17
Copying Information Objects
Managing Modeling Content
Select the system and click
on Next button.
Then define the folder
location and select the
package or models you want
to export.
Then select a target
repository and click on
Finish button.
2012 SAP AG. All rights reserved. 18
Copying Content Delivered by SAP
Managing Modeling Content
You use this procedure to copy standard content shipped by
SAP or an SAP partner to your local repository (see note
1608552 for implementing RDS content).
Prerequisite:
To copy the contents of objects, the administrator needs to
create a mapping in the
_SYS_BI.M_CONTENT_MAPPING table.
Procedure:
1. From the Quick Launch tab page, choose Mass Copy.
2. Select the required object(s).
3. Choose Add.
4. Choose Next.
Copy checkbox.
5. Choose Finish.
The status of content copy can be viewed in Job log.
2012 SAP AG. All rights reserved. 19
Translating Metadata Texts
2012 SAP AG. All rights reserved. 20
Repository Translation Tool (RTT)
The Repository Translation Tool (RTT) is a Java-based command
line tool that exports language files in a standard format for customer or
partner usage.
RTT implements this process in four steps:
Export: Exports the texts in the original language (written by the developer)
from the SAP HANA Repository text tables to the file system.
Upload : Uploads the texts from the file system to the SAP translation system.
After this step, the translators can translate the texts from the original
language into the required target languages.
Download: Downloads the translated texts from the SAP translation to the
file system.
Import: Imports the translated texts from the file system to the SAP HANA
Repository text tables.
2012 SAP AG. All rights reserved. 21
RTT Usage examples
Export the texts from those packages matching "pack*" from the database and upload the texts into the translation
system, using the default configuration file ("rtt.properties"):
rtt -e -p pack*
Download the translated texts from those packages matching "pack*" from the translation system and import the texts
into the database, using the default configuration file ("rtt.properties"):
rtt -i -p pack*
Export the texts from the database into the directory "exports":
rtt --export -p pack* -x exports
Upload the texts in the directory "exports" to the translation system:
rtt --upload -p pack* -x exports
Download the translated texts into the directory "imports":
rtt --download -p pack* -x imports
Import the translated texts from the directory
imports": rtt --import -p pack* -x imports
2012 SAP AG. All rights reserved. 22
You should now be able to:
Summary
Managing Modeling Content
Explain how to manage schemas
Explain how to import and export data model
Explain Translating metadata texts
2012 SAP AG. All rights reserved. 1
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
Template Roles
User Management & Security
Types of Privileges
Administrative
Unit 7: Security and Authorizations
2012 SAP AG. All rights reserved. 3
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
User Management & Security
Explain How To Handle User Management And User Provisioning,
Explain The Authentication Methods,
Explain User and Role Concept in SAP HANA,
Explain How To Maintain Users Roles,
Explain How To Maintain SAP HANA Privileges.
2012 SAP AG. All rights reserved. 4
This module covers the following topics:
2012 SAP AG. All rights reserved.
Overview
User Management & Security
User and Role Concept,
User and Role Creation,
Manage User or Role,
Grant and Revoke User or Role,
Assign Privilege to User or Role.
2012 SAP AG. All rights reserved. 5 2012 SAP AG. All rights reserved.
User Management and Security in SAP HANA
User Management & Security
Manage Users
Lock Users
Reset Passwords
Check User Privileges
Integration with BI
Assign Security
Control Access to Objects
Row-Level Security
Restrict allowed actions
Create Users
Assign Initial Passwords
Important User
Parameters
2012 SAP AG. All rights reserved. 6 2012 SAP AG. All rights reserved.
Relationships Between Entities
User Management & Security
A principal is either a role or a user.
A known user can log on to the database. A
user can be the owner of database objects.
A role is a collection of privileges and can be
granted to either a user or another role
(nesting).
A privilege is used to impose restrictions on
operations carried out on certain objects
The relevant entities mentioned below relate to each other in the
following way:
User management is configured using SAP HANA studio.
Object
Privilege Principal
Role User
n
n
n n
n
1
Granted to
owns
Granted to
2012 SAP AG. All rights reserved. 7 2012 SAP AG. All rights reserved.
User Provisioning - Get Users into the System
User Management & Security
Roles allow grouping privileges
Create roles for specific tasks, e.g.
Create data models (on a given subset of
the data)
Activate data models
Consume models
All types of privileges can be granted to a
role
Individual privileges
Roles (create a hierarchy of roles)
Roles / privileges can be assigned to
users
User / Role management are closely
related
Reflected in almost identical editor
Role:
edit model
Role:
activate model
User
Role:
edit + activate
Package:
create / edit
models
Package:
create / edit
models
SQL:
select
SQL:
select
Package:
activate
Package:
activate
SQL:
write
runtime
object
SQL:
write
runtime
object
2012 SAP AG. All rights reserved. 8 2012 SAP AG. All rights reserved.
User Provisioning - User and Role Concept
User Management & Security
Creating Named Users in SAP
HANA
Actual Database Users
Create via SAP HANA Studio
Or using standard SQL statements
Authentication Methods
User / Password
Set up and manage passwords using
SAP HANA Studio or SQL
Kerberos Authentication
Certificate-based
Requires Named User in SAP HANA
DB
2012 SAP AG. All rights reserved. 9 2012 SAP AG. All rights reserved.
Authentication concept
User Management & Security
SAP HANA database provides the
following options for authentication:
Direct logon to the SAP HANA
database with user name and password
Kerberos (third-party authentication provider) for
SSO Environment
For more administrative operations :
Such as database recovery, the credentials of the
SAP operating system user (<sapsid>adm) are also
required.
2012 SAP AG. All rights reserved. 10 2012 SAP AG. All rights reserved.
Additional Authentication Method, SAML
User Management & Security
Security Assertion Markup Language, SAML:
- For users not directly connected to SAP HANA..
- Used for authentication only (not authorization).
Middleware / Application Server
Scenario:
Application Server needs to connect
to SAP HANA Database on behalf
of a user. SAML assertion is
requested from the client.
SAML assertion is issued by the
identity provider after the client was
successfully authenticated there.
SAML assertion is then sent to SAP
HANA Database. Access is granted
based on the established trust to
the identity provider.
Connect with SAML
ASSERTION <XML>
HANA
Application
Server
Identity
Provider
Browser
R
R
R
HTTP
R
R
2012 SAP AG. All rights reserved. 11 2012 SAP AG. All rights reserved.
SAML In SAP HANA Studio
User Management & Security
SAML may be selected as a user authentication method when creating user
in the SAP HANA studio.
2012 SAP AG. All rights reserved. 12 2012 SAP AG. All rights reserved.
Managing Users and Roles
User Management & Security
Define and
Create Roles
Assign
Privileges to
Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 13 2012 SAP AG. All rights reserved.
Managing Users and Roles
User Management & Security
Define and
Create Roles
Assign
Privileges to
Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 14 2012 SAP AG. All rights reserved.
Creating Role using SAP HANA Studio
User Management & Security
Graphical UI for Creating /
managing roles
In SAP HANA Studio Navigator
Tree
Path: <SID> (<User>) Catalog
Authorizations
Right-Click Roles folder
Select New Role from context
menu
Using SQL Syntax
Run the following statement:
CREATE ROLE <ROLE_NAME>;
Define and
Create Roles
Assign
Privileges to
Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 15 2012 SAP AG. All rights reserved.
Managing Users and Roles
User Management & Security
Define and
Create Roles
Assign
Privileges
to Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 16 2012 SAP AG. All rights reserved.
Assign Privileges to Roles
User Management & Security
On the appropriate privilege tab:
Click on the green icon
In the search box, start typing
For System / Object Privileges : the
object name
For direct privilege assignment: the
privilege name
Select the desired object or privilege
Click OK
Define and
Create Roles
Assign
Privileges to
Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 17 2012 SAP AG. All rights reserved.
Managing Users and Roles
User Management & Security
On the appropriate privilege tab:
Click on the green icon
In the search box, start typing
For System / Object Privileges : the
object name
For direct privilege assignment: the
privilege name
Select the desired object or privilege
Click OK
Define and
Create Roles
Assign
Privileges to
Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 18 2012 SAP AG. All rights reserved.
Assign Privileges to Roles and save
User Management & Security
Using the save button
Using the deploy button (green
arrow)
Errors during save
Typically: missing privilege for editing
user (USER ADMIN)
Or missing grant option:
For Object/Privilege
combinations: on object
For direct privilege
assignment: on privilege
Define and
Create Roles
Assign
Privileges to
Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 19 2012 SAP AG. All rights reserved.
Managing Users and Roles
User Management & Security
Define and
Create Roles
Assign
Privileges to
Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 20 2012 SAP AG. All rights reserved.
Create Users or Roles
User Management & Security
Graphical UI for Creating / managing roles
In SAP HANA Studio Navigator Tree
Path: <SID> (<User>) Catalog Authorizations
Right-Click Users folder
Select New User from context menu
Choose authentication methods
Define the initial password (user/password)
Or define the external User ID (e.g. Kerberos
to set up SSO)
Other user settings
Define default client
This is used as an implicit filter value when
reading from SAP HANA data models
To save the user:
Define and
Create
Roles
Assign Privileges
to Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 21 2012 SAP AG. All rights reserved.
Managing Users and Roles
User Management & Security
Define and
Create Roles
Assign
Privileges to
Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 22 2012 SAP AG. All rights reserved.
Grant Roles to User
User Management & Security
Using Studio:
Switch to tab Granted Roles in User
Editor
Open search dialog ( )
Start typing the role name
Add the role
Allow/disallow granting the role
(note: System Privilege ROLE ADMIN
supersedes this GRANT OPTION)
Using SQL Syntax
Run the following statement:
GRANT <ROLE_NAME> TO <user>;
Define and Create
Roles
Assign
Privileges to
Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 23 2012 SAP AG. All rights reserved.
Grant Role to User
User Management & Security
Using the save button
Using the deploy button
(green arrow)
Errors during save
Typically: missing privilege for editing
user
E.g.: System privilege ROLE ADMIN
missing
Or (without ROLE ADMIN): GRANT
OPTION for role missing
Define and Create
Roles
Assign
Privileges to
Roles
Create
Users
Grant Role
to User
2012 SAP AG. All rights reserved. 24 2012 SAP AG. All rights reserved.
Revoke Roles from User
User Management & Security
Using Studio:
Switch to tab Granted Roles in User Editor
Select the role from list of granted roles
Click the icon
Save the user
(this also revokes a GRANT OPTION)
Using SQL Syntax
Run the following statement:
REVOKE <ROLE_NAME> FROM <user>;
Note on Cascaded Dropping of
Privileges
If the user had granted the role to other users,
revoking the role (and the grant option) also
revokes the role from these grantees
2012 SAP AG. All rights reserved. 25
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
User Management & Security
Explain How To Handle User Management and User Provisioning,
Explain The Authentication Methods,
Explain User and Role Concept in SAP HANA,
Explain How To Maintain Users Roles,
Explain How To Maintain SAP HANA Privileges.
Template Roles
User Management & Security
Types of Privileges
Administrative
Unit 7: Security and Authorizations
2012 SAP AG. All rights reserved. 27
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Types of privileges
Explain The Authorization Concept,
Explain What is SQL Privilege,
Explain What is SYSTEM Privilege,
Explain What is Package Privilege,
Explain What is Analytic Privilege,
Explain What is a Template Role.
2012 SAP AG. All rights reserved. 28
This module covers the following topics:
2012 SAP AG. All rights reserved.
Overview
Types of privileges
Authorization Concept,
SQL Privilege,
SYSTEM Privilege,
Package Privilege,
Analytic Privilege.
2012 SAP AG. All rights reserved. 29 2012 SAP AG. All rights reserved.
Authorization concept
Types of privileges
SQL Privilege
Privilege SQL statement
type (for example,
SELECT, UPDATE, and
CALL)
System Privilege
Used for
administrative tasks.
System Privileges
are assigned to users
and roles.
Package Privilege
Restrict the access to
and the use of packages
in the repository
Analytic Privilege
Analytic Privileges
are used to provide
row-level
authorization Views.
Analytic
privilege
Package
privilege
SYSTEM
privilege
SQL
privilege
Authorization
Concept
When accessing the SAP HANA database using a client interface (such as
ODBC, JDBC, MDX), any access to data must be backed by corresponding
privileges. Different schemes are implemented
2012 SAP AG. All rights reserved. 30 2012 SAP AG. All rights reserved.
SQL Privilege
Types of privileges
In the SAP HANA database, a number of privileges are available to control the
authorization of SQL commands. Following the principle of least privilege, users
should only be given the smallest set of privileges required for their role.
Two groups of SQL Privileges are available:
System Privileges
These are system-wide privileges that control some
general system activities mainly for administrative
purposes, such as creating schema, creating and
changing users and roles.
Object Privileges
These privileges are bound to an object, for example,
to a database table, and enable object-specific
control activities, such as SELECT, UPDATE, or
DELETE to be performed.
2012 SAP AG. All rights reserved. 31 2012 SAP AG. All rights reserved.
System Privilege
Types of privileges
6 types of system privilege are available on SAP HANA Database:
System
privilege
Users and
Roles
Catalog and
Schema
Management
Analytics Auditing
System
Management
Data Import
and Export
2012 SAP AG. All rights reserved. 32 2012 SAP AG. All rights reserved.
System Privilege
Types of privileges
6 types of system privilege are available on SAP HANA Database:
System
privilege
Users and
Roles
Catalog and
Schema
Management
Analytics Auditing
System
Management
Data Import
and Export
2012 SAP AG. All rights reserved. 33 2012 SAP AG. All rights reserved.
Package Privilege Assign to users/roles
Types of privileges
In the SAP HANA studio, you can
manage the package privileges on the
Package Privileges tab
The SAP HANA database repository is
structured hierarchically with packages
assigned to other packages as
subpackages. If you grant privileges to a
user for a package, the user is
automatically also authorized for all
corresponding subpackages.
2012 SAP AG. All rights reserved. 34 2012 SAP AG. All rights reserved.
Package Privilege Create package & subpackage
Types of privileges
Create a subpackage
(right click under a package)
Create a package
(right click under Content )
The SAP HANA database repository is structured hierarchically with packages assigned
to other packages as subpackages. If you grant privileges to a user for a package, the
user is automatically also authorized for all corresponding subpackages.
2012 SAP AG. All rights reserved. 35 2012 SAP AG. All rights reserved.
Package Privilege Native & Imported
Types of privileges
Exported
packages
Exported
packages
SAP HANA 2
Exported
packages
SAP HANA 1
Package can be edited
Package cannot be edited, only import changes on the package
In the SAP HANA database repository a distinction is made between native and imported
packages. Native packages are packages that were created in the current system and
should therefore, be edited in the current system.
Imported packages from another system should not be edited, except by newly imported
updates.
An imported package should only be manually edited in exceptional cases.
Hence different privileges are required to manage Native or Imported privileges
2012 SAP AG. All rights reserved. 36 2012 SAP AG. All rights reserved.
Analytic Privilege - The concept
Types of privileges
Analytic Privileges are used to control access to SAP HANA data
models
Without Analytic Privilege, no data can be retrieved from
Attribute Views
Analytic Views
Calculation Views
Implement row-level security with Analytic Privileges
Restrict access to a given data container to selected Attribute Values
Field from Attribute View
Field from Attribute View used in Analytic View
Private Dimension of Analytic View
Attribute field in Calculation View
Combinations of the above
Single value, range, IN-list
2012 SAP AG. All rights reserved. 37 2012 SAP AG. All rights reserved.
Analytic Privilege - The concept
Types of privileges
Analytic Privileges are used to control access to SAP HANA data
models
Without Analytic Privilege, no data can be retrieved from
Attribute Views
Analytic Views
Calculation Views
Implement row-level security with Analytic Privileges
Restrict access to a given data container to selected Attribute Values
Field from Attribute View
Field from Attribute View used in Analytic View
Private Dimension of Analytic View
Attribute field in Calculation View
Combinations of the above
Single value, range, IN-list
2012 SAP AG. All rights reserved. 38 2012 SAP AG. All rights reserved.
Analytic Privilege - Start creation wizard
Types of privileges
Analytic Privileges are repository objects
Create and manage via SAP HANA Studio
Create in any package
Does not need to be the same package as views
Call creation wizard:
Right-click folder Analytic Privileges in package
Enter name and description
Click Next
2012 SAP AG. All rights reserved. 39 2012 SAP AG. All rights reserved.
Analytic Privilege Select Information Models
Types of privileges
Select applicable Information
Models
Views have two functions in
privilege
Views you want to grant access to
Views from which you want to
select fields for restrictions
You can add further views
to the privilege later
2012 SAP AG. All rights reserved. 40 2012 SAP AG. All rights reserved.
Analytic Privilege - Editor Overview
Types of privileges
Restrictions apply to all views in list of
Reference Models
Choose Add in Reference Models
section
Pick any appropriate view
From any package
Do not use the Applicable to All
Content Models-option
Reason:
Can have surprising side-effects
You give away control over model access
2012 SAP AG. All rights reserved. 41 2012 SAP AG. All rights reserved.
Analytic Privilege - Select field for attribute
restriction
Types of privileges
You may implement value restrictions for all selected fields
If no value restriction implemented no restriction (wildcard)
Otherwise: user will only be allowed to see listed values
UI offers single value or range condition
Can add several conditions per field (combined via AND)
2012 SAP AG. All rights reserved. 42 2012 SAP AG. All rights reserved.
Analytic Privilege
Types of privileges
Like views: activation required to create run-time object
Only run-time object is grantable to users / roles
Name of run-time object: <package>/<privilege_name>
OR
2012 SAP AG. All rights reserved. 43
Analytic Privilege Check
Types of privileges
The Analytic Privilege Check evaluates
Analytical Privileges:
Granted to the User
With Cube restriction covering the
view
With currently valid Validity
restrictions
With Activity restrictions (READ)
With Dimension restrictions covering
attributes of the view
If no Analytic Privilege for the user can
be found, user queries are rejected
with a not authorized error
message.
Trace file in SAP HANA Studio
Administration Diagnosis Files
2012 SAP AG. All rights reserved. 44
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
Types of privileges
Explain The Authorization Concept,
Explain What is SQL Privilege,
Explain What is SYSTEM Privilege,
Explain What is Package Privilege,
Explain What is Analytic Privilege,
Explain What is a Template Role.
Template Roles
User Management & Security
Types of Privileges
Administrative
Unit 7: Security and Authorizations
2012 SAP AG. All rights reserved. 46
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Template Roles
Explain The Purpose Of the Pre-Delivered Roles,
Explain Which role is Required for Information Composer.
2012 SAP AG. All rights reserved. 47
This module covers the following topics:
2012 SAP AG. All rights reserved.
Overview
Template Roles
Pre Delivered Role,
Role for Information Composer.
2012 SAP AG. All rights reserved. 48 2012 SAP AG. All rights reserved.
Pre-delivered Roles
Template Roles
SAP HANA comes with several pre-defined / standard roles :
Roles that should (must) be used unchanged
PUBLIC minimal privileges for a user to work with the database at all
Is implicitly granted whenever a user is created
Role templates
CONTENT_ADMIN the only role in the system with vital privileges, e.g.:
SQL Privileges on Schema _SYS_BIC with GRANT OPTION
SQL Privileges on Schema _SYS_BI with GRANT OPTION
MODELING a very richly privileged role that enables
Creation and activation of Information Models
Creation and activation of Analytic Privileges
MONITORING role with full read-only access to all meta data, monitoring and statistics
Regard these roles as templates name change coming soon
Do not use these roles build your own roles instead
2012 SAP AG. All rights reserved. 49 2012 SAP AG. All rights reserved.
Information Composer Role
Template Roles
The SAP HANA Information Composer is a Web application that allows you to
upload and manipulate data on the SAP HANA database. The SAP HANA
Information Composer uses the SAP NetWeaver Core Engine for Partners 1.0
(LJS 1.0), which interacts with the SAP HANA database.
The roles required to access to the SAP HANA Information Composer client:
IC_MODELER role: This role allows users to upload new content into the SAP HANA
database and to create physical tables and calculation views.
IC_PUBLIC role : This role allows users to see the shared physical tables and calculation
views
As long as the SAP HANA Information Composer is in
use, the SAP_IC user must not be deleted. Otherwise, the
IC_MODELER and IC_PUBLIC roles will also be deleted.
2012 SAP AG. All rights reserved. 50
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
Template Roles
Explain the purpose of the pre-delivered Roles,
Explain which role is required for Information Composer.
Template Roles
User Management & Security
Types of Privileges
Administrative
Unit 7: Security and Authorizations
2012 SAP AG. All rights reserved. 52
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Administrative
Explain How To Deactivate a User,
Explain How To Reactivate a User,
Explain How To Reset a Locked User,
Explain How To Manage User Password.
2012 SAP AG. All rights reserved. 53
This module covers the following topics:
2012 SAP AG. All rights reserved.
Overview
Administrative
Deactivate / Reactivate User,
Manage Connection Attempt,
Set Initial Password to User,
Force User To Change Password.
2012 SAP AG. All rights reserved. 54 2012 SAP AG. All rights reserved.
Deactivate / Reactivate a user
Administrative
Deactivation of Users
The administrator can deactivate a user account with the following SQL
command: ALTER USER <user_name> DEACTIVATE USER NOW;
After the user account is deactivated, the user cannot log on to the SAP HANA
database until the administrator resets the users password.
Reactivation of Users
The administrator can reactivate a user account. A user account can be locked
because of the following reasons:
The users password has expired.
The user has made too many invalid logon attempts.
If the users password has expired, the user has to change the password to a new
value. If the user has made too many invalid logon attempts, the administrator
can use an SQL command to unlock the user account.
2012 SAP AG. All rights reserved. 55 2012 SAP AG. All rights reserved.
Deactivate / Reactivate a user
Administrative
Deactivation of Users
The administrator can deactivate a user account with the following SQL
command: ALTER USER <user_name> DEACTIVATE USER NOW;
After the user account is deactivated, the user cannot log on to the SAP HANA
database until the administrator resets the users password.
Reactivation of Users
The administrator can reactivate a user account. A user account can be locked
because of the following reasons:
The users password has expired.
The user has made too many invalid logon attempts.
If the users password has expired, the user has to change the password to a new
value. If the user has made too many invalid logon attempts, the administrator
can use an SQL command to unlock the user account.
2012 SAP AG. All rights reserved. 56 2012 SAP AG. All rights reserved.
Deactivate / Reactivate a user in SAP HANA Studio
Administrative
Prerequisite: System Privilege USER ADMIN
Deactivate
Reactivate
2012 SAP AG. All rights reserved. 57 2012 SAP AG. All rights reserved.
Manage connection attempts
Administrative
The number of invalid logon attempts allowed is set to 6 by default). Which means
after too many wrong attempts, the user will be locked. The Administrators can
reset the number of invalid logon attempts with the following SQL command:
ALTER USER <user_name> RESET CONNECT ATTEMPTS ;
With the first successful logon after an invalid logon attempt, an entry is made into
the INVALID_CONNECT_ATTEMPTS view showing:
The number of invalid logon attempts since the last successful logon
The time of the last successful logon
Administrators and users can delete the information of invalid logon attempts with
the following SQL command:
ALTER USER <user_name> DROP CONNECT ATTEMPTS;
2012 SAP AG. All rights reserved. 58 2012 SAP AG. All rights reserved.
Manage user password
Administrative
Defines whether users have to change their initial passwords at first logon.
Logging on with the initial password is still possible but only
ALTER USER <current_user> PASSWORD <password>; the command can be
executed. All other statements give the error message "user is forced to change
password".
Administrators can force a user to change the password at any time with the
following SQL command:
ALTER USER <user_name> FORCE PASSWORD CHANGE
2012 SAP AG. All rights reserved. 59 2012 SAP AG. All rights reserved.
System Tables and Monitoring Views
Administrative
System tables and monitoring views query information about the system using SQL
commands. The results appear as tables in SYS Schema.
Some of the tables and views support User Management.
For Example:
Tables:
P_Users All users
P_User_ Kerberos Kerberose users
P_User_SAML SAML users
P_Password Password change time
Views:
Invalid_ Connection_Attempts Number of invalid connection attempts for a user
Granted_Privileges Privileges granted to Users and Roles
Granted_Roles Roles granted to Users or other Roles
SAML_Providers SAML Providers
2012 SAP AG. All rights reserved. 60
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
Administrative
Explain How To Deactivate a User,
Explain How To Reactivate a User,
Explain How To Reset a Locked User,
Explain How To Manage User Password.
2012 SAP AG. All rights reserved. 1
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
Data Replication at a Glance
Positioning and Key Concepts
Overview on Configuration Aspects
Transformation of Data
SLT based transformation concepts and Advanced Replication settings
Extension of (target) table structure and Partitioning
Filtering and Selective Data Replication
Specific Considerations
Administration and Monitoring at a Glance
Appendix
Unit 8: Data Provisioning using SLT
2012 SAP AG. All rights reserved. 3
At the end of this Lesson you will be able to:
Objectives
Positioning and Key Concepts
Explain the positioning of SAP LT Replication Server
Describe the key concepts and features
List the prerequisites and how to set up the
SAP LT Replication Server
Name the benefits of the trigger-based replication
approach
2012 SAP AG. All rights reserved. 4
This module covers the following topics:
Overview
Positioning and Key Concepts
Product name, positioning and key benefits
Commercial aspects and software shipment
Overview on key concepts, features and user interfaces
Overview on key installation and configuration steps
2012 SAP AG. All rights reserved. 5
Product Name
SAP Landscape
Transformation
Replication Server for
SAP HANA
2012 SAP AG. All rights reserved. 6
SAP LT Replication Server for SAP HANA Leverages Proven SLO Technologies
Application Lifecycle Management
SLO
*
technologies have been used
since more than 10 years in hundred
of projects per year
Key offerings foster SAPs
Application Lifecycle Management
concept
SAP LT Replication Server - as a
new use case - leverages several
SLO technologies
*) System Landscape Optimization
2012 SAP AG. All rights reserved. 7
Positioning and Key Benefits of SAP LT Replication Server for SAP HANA
Key Benefits of the Trigger-Based Approach:
Allows real-time (and scheduled) data replication from SAP and NON-SAP
sources, replicating only relevant data into HANA
Ability to migrate data into HANA format while replicating data in real-time
Unlimited release coverage (from SAP R/3 4.6C onwards) sourcing data
from SAP ERP (and other ABAP based SAP applications)
Leverages proven SLO technology (Near Zero Downtime, TDMS, SAP LT)
Simple and fast set-up of LT replicator (initial installation and configuration
in less than 1day) and fully integrated with HANA modeler UI
SAP LT Replication Server is the ideal solution for all HANA
customers who need real-time or scheduled data replication
sourcing from SAP and NON-SAP sources
2012 SAP AG. All rights reserved. 8
Commercial Aspects and Software Shipment
Commercial Aspects
SAP LT Replication Server for SAP HANA will be
part of SAP HANA software license model
Software Shipment
SAP LT Replication Server for SAP HANA will be
part of SAP HANA software shipment and fully
integrated into the SAP HANA modeler UI
2012 SAP AG. All rights reserved. 9
Overview - Trigger-Based Approach
Positioning and Key Concepts
SAP HANA system SAP source system SAP LT Replication Server
Application Table
Trigger Based
Delta Recording
Replication
Engine
Application Table
RFC
Connection
HANA Studio
DB
Connection
Replication Configuration
Connection(s) between source system and SAP HANA system are
defined as Configuration on the SAP LT Replication Server
Data load and replication are
triggered via SAP HANA Studio
SAP LT Replication Server does not
have to be a separate SAP system and
can run on any SAP system with SAP
NetWeaver 7.02 ABAP stack (Kernel
7.20EXT)
2012 SAP AG. All rights reserved. 10
Architecture and Key Building Blocks
Positioning and Key Concepts
SAP HANA system SAP LT Replication Server SAP source system
Efficient initialization of data
replication based on DB trigger
and delta logging concept
(as with NearZero downtime approach)
Flexible and reliable replication
process, incl. data migration
(as used for TDMS and SAP LT)
Fast data replication via DB connect
LT replication functionality is fully
integrated with HANA Modeler UI
Application table Logging table
DB trigger
Read module Structure mapping &
Transformation
Application table
Write module
RFC
Connection
DB
Connection
2012 SAP AG. All rights reserved. 11
Architecture for Non-SAP Source Replication
Positioning and Key Concepts
In a first step, SAP LT Replication Server transfers all metadata table definitions from the non-SAP
source system to the HANA system. From the HANA Studio perspective, non-SAP source replication
works as for SAP sources. When a table replication is started, SAP LT Replication Server creates
logging tables within the source system. As a difference, the read modules are created in the SAP LT
Replication Server. The connection the non-SAP source system is established as a database
connection.
SAP HANA system SAP LT Replication Server Non SAP source system
Application table Logging table
DB trigger
Read module
Structure mapping &
Transformation
Application table
Write module
DB
Connection
DB
Connection
2012 SAP AG. All rights reserved. 12
Multi System Support 1/2
Positioning and Key Concepts
SAP HANA system Source systems
System A
System A
System B
System B
Schema 1
Schema 2
Source systems are
connected to separate
HANA schema on the
same HANA System
SAP HANA system Source systems
System A
System A
System B
System B
Schema 1
Schema 1
Source systems are
connected to separate
HANA systems.
Schema name can be
equal or different
2012 SAP AG. All rights reserved. 13
Multi-System Support 1/2
Positioning and Key Concepts
If one source system is connected to several target schemas (currently up to 1:4 supported), the relevant
target schema can be selected in the data provisioning UI.
If one source system is connected to several target schemas (currently up to 1:4 supported), the relevant
target schema can be selected in the data provisioning UI.
SAP HANA system Source systems
System A
System A
System B
System B
Schema 1
Source systems are
connected to same
HANA system and
also the same
schema
SAP HANA systems SAP Source system
Schema 1
Schema 2
System A
System A
SAP source system
is connected to
separate HANA
systems or to the same
system with different
schema name.
N:1 Replication
1:N Replication
2012 SAP AG. All rights reserved. 14
Set-up of LT Replication Server
Positioning and Key Concepts
Configuration steps for SAP LT Replication Server
Define a schema for each source system
Define connection to source system
Define DB connection into SAP HANA
Define replication frequency (real-time; frequency for scheduled replication)
Define maximum number of background jobs for data replication
Installation aspects
Source system(s): use respective DMIS add-on
LT replication server: use add-on DMIS_2010_1_700 with SP5-7;
other system requirements (NW 7.02; SAP Kernel 7.20EXT) apply
Apply SPS04 for SAP HANA 1.0
Set-up of data replication in SAP HANA
Select relevant source system
Start (initial load only and / or continuous replication)
2012 SAP AG. All rights reserved. 15
Key Configuration Steps
Positioning and Key Concepts
Call SAP LT Replication Server
Configuration (Transaction: LTR)
Define configuration data
2012 SAP AG. All rights reserved. 16
Starting the Data Replication
Positioning and Key Concepts
Choose data provisioning to
launch SAP HANA Modeler UI
1. Select source system and target schema as
defined in SAP LT Replication Server; related
system information and schema will be
displayed
2. Use button Load and / or Replicate to set up
the data replication
3. Use button Stop Replication to finish
replication
4. Use button Suspend to pause replication
5. Use button Resume to continue replication
2012 SAP AG. All rights reserved. 17
DB Supportability Matrix (HANA 1.0 SPS04):
Loading Data via SAP LT Replication Server for SAP
HANA
Database
Technical availability
SAP Sources Non SAP Sources (*)
MSFT SQL Server Enterprise
Edition
OK OK
Oracle Enterprise Edition
OK OK
IBM DB2 LUW/ UDB (DB6)
OK OK
IBM DB/2 zSeries
OK OK
IBM DB2 iSeries (former AS/400)
OK Planned
IBM Informix
OK Planned
SAP MaxDB
OK OK
Sybase ASE
OK
(with DB-Version 15.7.0.11)
OK
(with DB-Version 15.7.0.11)
For non-SAP source systems, the customer database license needs to cover a permanent
database connection with 3
rd
party products like LT replication server.
(*) Since a DB connection from LT replication server to a non-SAP system is required, the OS/DB restrictions of
NetWeaver 7.02 apply (see at http://service.sap.com/pam)
2012 SAP AG. All rights reserved. 18
SAP LT Replication Server - Technical Enabler for Multiple
Data Provisioning Use Cases
Table-base Replication integrated into HANA Studio
Real-time for SAP and NON-SAP sources
Replication engine for existing RDS
Solutions and ERP Accelerators
Replication engine for new
SAP HANA Application Accelerators
+ serving HANA in the Cloud
2012 SAP AG. All rights reserved. 19
You should now be able to:
Summary
Positioning and Key Concepts
Explain the positioning of SAP LT Replication Server
Describe the key concepts and features
List the prerequisites and how to set up the
SAP LT Replication Server
Name the benefits of the trigger-based replication approach
Data Replication at a Glance
Positioning and Key Concepts
Overview on Configuration Aspects
Transformation of Data
SLT based transformation concepts and Advanced Replication settings
Extension of (target) table structure and Partitioning
Filtering and Selective Data Replication
Specific Considerations
Administration and Monitoring at a Glance
Appendix
Unit 1: Data Provisioning using SLT
2012 SAP AG. All rights reserved. 21
At the end of this Lesson you will be able to:
Objectives
Overview on configuration aspects
Describe the set-up of a configuration on the
SAP LT Replication Server
Explain the impact of the configuration set-up on the data
replication
2012 SAP AG. All rights reserved. 22
Concept: Define Configuration / Schema
Overview on configuration aspects
A new configuration can be created in the LT Configuration and Monitoring Dashboard. In
that step, the connection between the source and the HANA system is established and the
target schema will be created (if it doesnt exist already). Also replication control tables are
created and table lists are replicated from the source system. In addition, the required roles
and GRANT / REVOKE procedures are generated.
SAP HANA system SAP source system SAP LT Replication Server
Trigger-based
delta recording
Replication
engine
RFC
Connection
Replication
Configuration
Schema 1
DB
Connection
2012 SAP AG. All rights reserved. 23
General Data
Define the replication target Schema Name in the HANA
system (if schema does not exist, it will be created
automatically)
Define the Number of Replay Jobs used for data load
and replication
Connection to the source system
SAP Source System: Use previously defined RFC
destination to source system
Non SAP Source System: Select the source database
system and set the required fields (see also next slides)
Connection to HANA system
Define the User Name and Password which can be used to connect to the HANA system (see also next slide)
Define the Host Name and Instance Number of the target HANA system
Allow Multiple Usage
to allow usage of source system in different configurations (1:N replication)
Read from Single client
Flag for client specific load and replication. Read will be only from the client which is specified in RFC connection
Table space assignment
Optional: define table space for logging tables. If no table space is defined, logging table will be created in the same table space as the
original table. Own table space is recommended for easier monitoring of the table sizes of the logging tables
Replication Mode
Replication can be executed in Real-time mode or in Scheduled mode
Creating a New Configuration for SAP Sources
Overview on configuration aspects
2012 SAP AG. All rights reserved. 24
Creating a New Configuration for Non-SAP Sources
Overview on configuration aspects
To replicate from non-SAP source
system select Legacy and the
affected database system.
Depending on the database system,
additional required information needs
to be specified (e.g. for DB2 specify
the DB connection and the table
space name).
Start with transaction LTR
2012 SAP AG. All rights reserved. 25
Results of Creating a New Configuration
Overview on configuration aspects
When the popup to create a new configuration is closed by pressing the
OK button, the following actions are performed automatically:
Configuration settings are saved on the LT Replication Server
New user and schema are created on the HANA system with the defined
target schema name (not performed if an existing schema is reused)
Replication control tables (RS_* tables) are created in target schema
User roles for the target schema are created:
<target_schema>_DATA_PROV -> Role to manage data provisioning
<target_schema>_POWER_USER -> Contains all SQL privileges of the
target schema
<target_schema>_USER_ADMIN -> Role to execute authority
procedures (see below)
A procedure to grant (RS_GRANT_ACCESS) or revoke
(RS_REVOKE_ACCESS) are created in the target schema
Replication of tables DD02L (stores the table list), DD02T (stores the table
short descriptions) and DD08L (R/3 DD: relationship definitions) is started
automatically. Once those tables are replicated , the HANA studio knows
which tables are available in the source system
SYS_REPL and table RS_REPLICATION_COMPONENTS are created
(if they dont exist already based on a previous configuration)
Replication is registered in table RS_REPLICATION_COMPONENTS
2012 SAP AG. All rights reserved. 26
You should now be able to:
Summary
Overview on configuration aspects
Describe the set-up of a configuration on the
SAP LT Replication Server
Explain the impact of the configuration set-up on
the data replication
Data Replication at a Glance
Positioning and Key Concepts
Overview on Configuration Aspects
Transformation of Data
SLT based transformation concepts and Advanced Replication settings
Extension of (target) table structure and Partitioning
Filtering and Selective Data Replication
Specific Considerations
Administration and Monitoring at a Glance
Appendix
Unit 1: Data Provisioning using SLT
2012 SAP AG. All rights reserved. 28
At the end of this Lesson you will be able to:
Objectives
Data Replication at a Glance
Explain the different option for data replication and the
related implications
2012 SAP AG. All rights reserved. 29
This module covers the following topics:
Overview
Data provisioning at a glance
Load and replicate data
Suspend and resume data replication of certain tables
Stop and Restart the master job of a configuration in SLT
2012 SAP AG. All rights reserved. 30
Launch Data Provisioning UI
Data provisioning at a glance
All further data provisioning steps
are executed from the HANA
Studio. Therefore, switch to the
HANA Studio, choose the
perspective Information Modeler
and start the quick launch.
Select your system and start the
Data Provisioning via the link in
section DATA.
If you cannot enter this screen or
do not see any data, verify if a data
provisioning role was assigned to your
user.
2012 SAP AG. All rights reserved. 31
Start Load / Replication
Data provisioning at a glance
Press the respective button to
Load the current data of a table from the source system
Replicate a table includes the load of the current data and the replication of all changes
in the source system
Choose a table from the
list or enter a search
string to search for a
specific table.
Use the button Add to
select the table.
Once all relevant tables
are selected, load /
replication is triggered
when popup is closed via
button Finish.
Replication includes load
and delta replication
2012 SAP AG. All rights reserved. 32
Start Load/Replication - Executed Activities
Data provisioning at a glance
SAP HANA system SAP LT Replication Server SAP source system
Application Table Logging Table
DB Trigger
Read module Structure mapping &
transformation
Application Table
Write module
RFC
Connection
DB
Connection
HANA Studio
Data provisioning can be managed via the HANA Studio modeler view using the data
provisioning. If a table is started for load or replication, the LT runtime objects (reader,
mapping and transformation and writer modules) are generated in the respective systems. If
tables are selected for replication, also the delta recording (logging table and DB trigger) is
activated on the source system.
2012 SAP AG. All rights reserved. 33
Stop / Suspend Replication
Data provisioning at a glance
Stop the replication and also to stop delta recording for that table (deletes DB trigger!)
Suspend data replication but keep delta recording active
Resume a previously suspended data replication
The table selection popup will look similar as for Load and Replication. In case of Stop Replication or
Suspend, only those tables can be selected which are already in replication mode. In case of Resume only
those tables can be selected which are in suspend mode.
Please be aware that in case a replication is stopped and started again, the
corresponding table will be dropped. The initial load must be repeated as delta
recording was deactivated for a certain time and changes might not be recorded.
So in case you only want to pause the delta replication, use the mode Suspend and
Resume as delta recording is not deactivated and the replication can be continued
without a need of a new initial data load.
Press the respective button to
2012 SAP AG. All rights reserved. 34
Stop/Suspend Replication - Executed Activities
Data provisioning at a glance
Stop replication
SAP HANA system SAP LT Replication Server SAP source system
Stop data replication
Delete trigger & Log. tab.
Application Table Logging Table
DB Trigger
Application table
Suspend replication
SAP HANA system SAP LT Replication Server SAP source system
Stop data replication
Application table Logging table
DB Trigger
Application table
Resume replication
SAP HANA system SAP LT Replication Server SAP source system
Continue data replication
Application table Logging table
DB Trigger
Application table
2012 SAP AG. All rights reserved. 35
Configuration and Monitoring Dashboard
Master Job settings Stop and Restart
Triggers in source systems are still active and
working so the logging tables will be filled
continuously indepndent of stopping the master
job on SLT Replication Server!
Stopping option is usefull to pause the replication
of a configuration temporary only.
Choose configuration and change
to Edit mode
1
The master job can now easily be
stopped and restarted for the relevant
configuration on SLT Replication
Server. The whole replication for a
configuration will be stopped.
2
2012 SAP AG. All rights reserved. 36
You should now be able to:
Summary
Data provisioning at a glance
Explain the different option for data replication and
the related implications
Data Replication at a Glance
Positioning and Key Concepts
Overview on Configuration Aspects
Transformation of Data
SLT based transformation concepts and Advanced Replication settings
Extension of (target) table structure and Partitioning
Filtering and Selective Data Replication
Specific Considerations
Administration and Monitoring at a Glance
Appendix
Unit 8: Data Provisioning using SLT
2012 SAP AG. All rights reserved. 38
At the end of this Lesson you will be able to:
Objectives
Administration and Monitoring at a Glance
Explain the different option for monitoring the replication
process
2012 SAP AG. All rights reserved. 39
Status Monitoring in HANA Studio
Data provisioning at a glance
The load / replication status can be monitored in the Data Load Management
screen within the data provisioning tool. In this section, the current status of all
relevant tables of the selected source system / target schema is displayed.
2012 SAP AG. All rights reserved. 40
Configuration and Monitoring Dashboard
Enhanced Statistics
Additional statistical data can be
displayed in the Statistics tab
page. You can view the number of
records that have been replicated,
and the relevant operation (insert,
update, delete).
2012 SAP AG. All rights reserved. 41
SAP Replication Manager - Mobile Application 1/2
Benefits and Requirements
Execution Trigger execution of important data replication functions.
SUP2.1
Gateway (NW 7.02) (Minimal gateway)
Backend
IW_BEP 200 ( SP2.0)
IW_BEP ,GW add-on
DMIS (DMIS_2010)
SLT system should be a NW 700 EHP2 with
SAP Kernel 7.20 EXT
Monitor Monitor the data replication process and system parameters.
Higher Flexibility
Provide an analytical perspective of real-time data
replication in terms of latency.
Application can be run anytime and anywhere from a mobile
which is connected to the internet.
Analytical View
Infrastructure Requirements
2012 SAP AG. All rights reserved. 42
SAP Replication Manager - Mobile Application 2/2
Screenshots
Monitor
Execute
Analytical
View
Higher
Flexibility
2012 SAP AG. All rights reserved. 43
You should now be able to:
Summary
Administration and Monitoring at a Glance
Explain the different option for monitoring the
replication process
Data Replication at a Glance
Positioning and Key Concepts
Overview on Configuration Aspects
Transformation of Data
SLT based transformation concepts and Advanced Replication settings
Extension of (target) table structure and Partitioning
Filtering and Selective Data Replication
Specific Considerations
Administration and Monitoring at a Glance
Appendix
Unit 8: Data Provisioning using SLT
2012 SAP AG. All rights reserved. 45
At the end of this Lesson you will be able to:
Objectives
SLT based transformation concepts
Explain the basics of the SLT based transformation
concepts
Leverage the data processing and transformation process
Explain how to change advanced replication settings for
certain configurations of SLT Replicaion Server
2012 SAP AG. All rights reserved. 46
This module covers the following topics:
Overview
SLT based transformation concepts
Details on the basic concept of SLT based transformation
Trigger conditions in detail
2012 SAP AG. All rights reserved. 47
Concept
SLT based transformation concepts
The main purpose of SAP HANA is reporting data of particular ERP content.
Generally this will be done with an one-to-one replication of ERP table into the
new database.
Depending on the customer-specific requirement, its sometimes necessary to
filter, to change, or to extend the original data within the load process into HANA.
Key Use Cases:
Conversion of data
Change data within data replication/loading
Filtering
Reduce number of records to be replicated
Structural changes of target table in HANA
Add, remove and/or change type of fields in target table
Partitioning of target table in HANA
Partitioning within data replication/loading
2012 SAP AG. All rights reserved. 48
Concept
SLT based transformation concepts
Currently, transformation & filtering topics
are only provided by project base.
(Only for SAP lead projects)
2012 SAP AG. All rights reserved. 49
Concept - Data Processing
SLT based transformation concepts
Source system SAP LT Replication Server
RFC
Connection

Data Portions
Start of Replication Cycle
Get next portion from source
Loop through portion
1
5
4
2
3
Add record to sender portion
Map fields of a record to
receiver structure
SAP HANA system
DB
Connection

Data Portions
The data for transformation will be split into portions (default: load: 10,000 lines, replication: 5,000 lines)
The portions will be processed successively, mapped, and transferred to sender
Extension of functionality (for example data conversion) is possible at several points of the process using
ABAP includes Transformation rules
Implementation of rules, structure changes of tables, partitioning of tables etc. will specified within
Advanced Replication Settings (Transaction IUUC_REPL_CONTENT)
2012 SAP AG. All rights reserved. 50
Specify Advanced Replication Settings
Combined Transaction for all Table Settings (1)
General features of Advanced Replication Settings:
The UI is designed maintain customizing tables of SLT Replication server. This
customizing is used to set-up
structure changes of tables
partitioning of tables in SAP HANA
change and/or filter of data
performance optimization to use parallel read
withtin data replication.
Select
Configuration
Select
Table(s)
Define
tables
settings
Save
2012 SAP AG. All rights reserved. 51
UI to Specify Advanced Replication Settings
Combined Transaction for all Table Settings (2)
Transaction IUUC_REPL_CONTENT
Select Configuration
D
e
f
i
n
e

t
a
b
l
e

s
e
t
t
i
n
g
s
1
3
Transport settings /
transformation content
via upload / download
to other SLT system.
Select table
2
2012 SAP AG. All rights reserved. 52
Specify Advanced Replication Settings
Define Table Settings Process Flow
Enter
Tablename
Choose
Appropriate
Tabfolder
Save
Specify
Advanced
Replication
Setting for
Table
Add
Table
2012 SAP AG. All rights reserved. 53
Specify Advanced Replication Settings
Define Table Settings
Enter table name 1
Choose appropiate tab page:
IUUC_REPL_TABSTG
Define table deviation and partitioning
IUUC_ASS_RUL_MAP
Transformation rules to change and/or filter
data
IUUC_SPC_PROCOPT
Trigger specific adaption
IUUC_PERF_OPTION
Performance optimization to use parallel read
2
Ability to import or export
settings from / to file
(only SLT table settings from new UI)
2012 SAP AG. All rights reserved. 54
Advanced Replication Settings
Export/Import Settings Process Flow
Save Settings
from Dev-System
ImportSettings
into Target
SLT Server
Choose
Import Option
Set Parameter
if Option Load
Selected
Settings was
chosen
2012 SAP AG. All rights reserved. 55
UI to Specify Advanced Replication Content
Export/Import Settings Screenshots
Save Settings from Dev. System 1
I
m
p
o
r
t

S
e
t
t
i
n
g
s

i
n
t
o

T
a
r
g
e
t

S
L
T

S
e
r
v
e
r
2
Choose Import Option 3
Possibility to compare
and load settings
selectively for each
table
For the export / import options, only the settings of
Customizing tables will be uploaded and downloaded.
No objects (for example ABAP includes of rules)
are exported or imported.
If you import settings, the mass transfer ID of the
relevant SLT configuration must be entered.
2012 SAP AG. All rights reserved. 56
You should now be able to:
Summary
SLT based transformation concepts
Explain the basics of the SLT based transformation
concepts
Leverage the data processing and transformation
process
Explain how to change advanced replication settings
for certain configurations of SLT Replicaion Server
Data Replication at a Glance
Positioning and Key Concepts
Overview on Configuration Aspects
Transformation of Data
SLT based transformation concepts and Advanced Replication settings
Extension of (target) table structure and Partitioning
Filtering and Selective Data Replication
Specific Considerations
Administration and Monitoring at a Glance
Appendix
Unit 8: Data Provisioning using SLT
2012 SAP AG. All rights reserved. 58
At the end of this Lesson you will be able to:
Objectives
Change of (target) table structure and Partitioning
Explain the concept of extending a table
Specify your own extended structures
Explain how to implement partitioning
2012 SAP AG. All rights reserved. 59
Business Example
Change of (target) table structure
Change of Table Structures within Transformation
SAP HANA system SAP LT Replication Server Source system
DB
Connection
RFC
Connection
Scenarios
add table fields like Source System ID
recommended for N:1 Replication into same table
get rid of certain table fields in HANA
change type of table fields
(cast of values has to be defined within
transformation rules if needed)
Options of Implementation
1. By using a template table
Define template tables of target structure in Sender
system or SLT Server change table settings in
Replication Settings
2. By defining Table Deviation in Advanced Replication
Settings
2012 SAP AG. All rights reserved. 60
Specify Structure Changes
Setup changes in Advanced Replication Settings
name of table in SAP HANA
(optional)
Structural change by using
a template table
X: table of target type
was created in LT-
Replication Server
: table of target type
was created in sender
system
name of table with structure
to be used as template for
table
Structural change by
defining Table Deviation
Click on Edit Table Structure
2012 SAP AG. All rights reserved. 61
Specify Structure Changes
Define Table Deviation
A different target structure can be
defined - without having to create the
structure in the DDIC.
The table deviation can be defined in
table IUUC_REPL_TAB_DV. In this
case, only the deviation must be
defined (ignore, change, or add certain
fields). All other fields are derived from
the source system.
The table deviation can be defined in
the replication content UI.
There is no extra option to set the key
flag of a new table field. If the new field
should become a key field, you have to
set the position of the new field so that
the field in the following line is also a
key field.
2012 SAP AG. All rights reserved. 62
Specify Structure Changes
Example - Extend table with Key Field SOURCE_SYS_ID
Edit Table Structure 1
Define AdditionalField
on HANA
2
Start Load/Replication in HANA 3
2012 SAP AG. All rights reserved. 63
Specify Table Settings
Enhanced Table Settings - Partition
There is an additional field (PARTITION_CMD) in table IUUC_REPL_TABSTG where a
partitioning command can be defined for certain tables. The partition command will be added
to the create statement of the table on the HANA System.
The partition command has to be entered in the same way as it would be defined in the SQL
editor of the HANA studio, for example:
PARTITION BY HASH (a, b) PARTITIONS 4
SLT will add the partition command when generating the SQL command to create the table.
For example:
CREATE COLUMN TABLE mytab
(a INT, b INT, c INT, PRIMARY KEY (a,b))
PARTITION BY HASH (a, b) PARTITIONS 4
HANA WIKI - https://wiki.wdf.sap.corp/wiki/display/ngdb/Partitioning
Note that instead of the partitioning command, each SQL parameter (e.g. for localization) is possible
2012 SAP AG. All rights reserved. 64
Specify Table Settings
Further settings
NO_DROP data in HANA will not be deleted before
the replication
ROW_STORE target table in HANA will be created as
row table instead of column table
RD_PORTION_SIZE no of records per portion; empty means
default value
2012 SAP AG. All rights reserved. 65
You should now be able to:
Summary
SLT based transformation concepts
Explain the concept of extending a table
Specify your own extended structures
Explain how to implement partitioning
Data Replication at a Glance
Positioning and Key Concepts
Overview on Configuration Aspects
Transformation of Data
SLT based transformation concepts and Advanced Replication settings
Extension of (target) table structure and Partitioning
Filtering and Selective Data Replication
Specific Considerations
Administration and Monitoring at a Glance
Appendix
Unit 8: Data Provisioning using SLT
2012 SAP AG. All rights reserved. 67
At the end of this Lesson you will be able to:
Objectives
SLT based transformation concepts
Explain the different types of rules to change data
within replication
Specify the parameter in advanced replication settings
2012 SAP AG. All rights reserved. 68
Business Example
Transformation data
Change of Data within Replication by using Transformation Rules
SAP HANA System LT Replication Server Source System
DB
Connection
RFC
Connection
Options of Implementation
1. Applying Parameter Rules
2. Applying Event-Based Rues
Scenarios
To make certain fields anonymous HR reporting
To fill initial fields e.g. created by change of table stucture
To convert units or currency and recalculate amounts and
values
Transformation
of Data
2012 SAP AG. All rights reserved. 69
SLT based Transformation Concepts
Types of Transformation Rules
Types of Transformation Rules
Parameter-based rules
Less flexible than event-based rules
Easy to create by using parameters
Event-based rules
More flexible than parameter-based rules
Knowledge of data processing within the SAP LT Replication Server needed to
select the right event for the specific business scenario
has access to all fields of a record
Generally, there are two types of transformations rules, which can be used within
transformation
both has to be created as ABAP include, which can be embedded into replication
2012 SAP AG. All rights reserved. 70
Specify Data Transformation
Setup changes in Advanced Replication Settings
Data Transformation by
using a Parameter Rule
no event = Parameter Rule
Parameters of the rule,
which will be used in the
ABAP Include
Data Transformation by
using a Event-Based Rule
name of ABAP Include
containing the rule
event of the rule
not in use for event-Based
Rules
name of ABAP Include
containing the rule
2012 SAP AG. All rights reserved. 71
SLT based Transformation Concepts
Details - Parameter Rules
Parameter Rules
will be performed after the record is mapped to the receiver structure and before it will be added to the
sender portion
Import Parameters
are used within ABAP-Include to apply values, which were determined in Advanced Replication Settings
if no parameter has to be used within the rule, IMP_PARAM_1 has to be set to DUMMY! values of
fields of the sender record will be addressed in the include using the following name:
IMPORT PARAMETER 1: i_<fieldname>_1 (for example, i_mandt_1)
IMPORT PARAMETER 2: i_<fieldname>_2
IMPORT PARAMETER 3: i_<fieldname>_3
if you have defined a literal the technical name will be:
IMPORT PARAMETER 1: i_p1
IMPORT PARAMETER 2: i_p2
IMPORT PARAMETER 3: i_p3
Export Parameter
specifies the fieldname of the receiver structure, which has to be filled wihtin the parameter rule
Addressed in the include using the following name:
EXPORT PARAMETER: e_<fieldname> (for example, e_mandt).
2012 SAP AG. All rights reserved. 72
SLT based Transformation Concepts
Example - Fill Source_SYS_ID within Parameter Rule
Create ABAP include
1
Specify Advanced
Tables Settings for
the table
2
Start Load/Replication in
HANA
3
2012 SAP AG. All rights reserved. 73
SLT based Transformation Concepts
Details Event-Based Rules
Event based Rules and Parameter Rules
can be performed at several events of the transformation process
the event has to be determined in Advanced Replication Settings
Fields can be directly addressed in ABAP-Includes using field symbols
(event BOL, BOR, EOR and EOL only)
Fields of Sender Structure
<wa_s_(tab_name)>-<field> (for example, <wa_s_mara>-mandt)
Fields of Receiver Structure
<wa_r_(tab_name)>-<field> (for example, <wa_r_mara>-mandt)
Typical use-case for an event-based rule
if you have to apply a mapping to figure out the value of the field to be changed with the rule, a select
statement could be executed for each record wihtin a parameter rule. This could decrease the overall
performance of the replication dramatically.
By creating an event based rule at the beginning of the replication process (BOP or BOT) an internal
table containing the mapping information could be initialized once. In a second event-based rule where
the records will be processed, the mapping information can be taken from internal table (in memory)
instead of a select to database. So the overall performance can be optimzed by applying the event-
based rules.
2012 SAP AG. All rights reserved. 74
SLT based Transformation Concepts
Events of Event-Based Rules
Start Load / Replication
BOP Begin of Processing
DO
Get next portion from source system
BOT Begin of Block
LOOP AT source
BOL Begin of Loop
MOVE-CORRESPONDING
source To target
BOR Begin of Record
individual field mapping
EOR End of Record
EOL End of Loop
ENDLOOP
Write to target system
EOT End of Block
ENDDO
EOP End of processing
BOP (Begin of Processing):
Processed only once, before the data transfer really starts.
Can be used to initialize certain global fields that might be used in subsequent
events (for example, fill internal mapping tables)
EOP (End of Processing):
Processed only once, after the data transfer is completed.
BOT (Begin of Block):
Access to all data records of a portion read from the sender system
EOT (End of Block):
Access to all data records immediately before they are passed to the receiver
system
BOL (Begin of Loop):
Like BOT if only one table is included in the conversion object; in case of objects
with multiple tables, it can be applied to each specific table
EOL (End of Loop):
Like EOT if only one table is included in the conversion object; in case of objects
with multiple tables, it can be applied to each specific table
BOR (Begin of Record):
This event is processed before the field mapping of the individual fields is
started.
EOR (End of Record):
This event is processed after the field mapping of the individual fields of a
certain data record has finished.
2012 SAP AG. All rights reserved. 75
SLT based Transformation Concepts
Example - Fill Source_SYS_ID within Event-Based Rule
Create ABAP include 1
Specify Advanced
Tables Settings for
the table
2
2012 SAP AG. All rights reserved. 76
SLT based Transformation Concepts
Transformation Rules - Insert Line of Coding
Instead of an ABAP routine, which contains the transformation rules, it is
possible to enter one line of coding (max 72 characters) directly.
If the line of coding is defined, no ABAP include will be performed.
This option is suitable for implementing simple parameter rules to fill table
fields, such as the source system ID.
2012 SAP AG. All rights reserved. 77
You should now be able to:
Summary
Extension of (target) table structure
Explain the different types of rules to change data within
replication
Specify the parameter in advanced replication settings
Data Replication at a Glance
Positioning and Key Concepts
Overview on Configuration Aspects
Transformation of Data
SLT based transformation concepts and Advanced Replication settings
Extension of (target) table structure and Partitioning
Filtering and Selective Data Replication
Specific Considerations
Administration and Monitoring at a Glance
Appendix
Unit 8: Data Provisioning using SLT
2012 SAP AG. All rights reserved. 79
At the end of this Lesson you will be able to:
Objectives
Selective data replication
Explain the benefit of filtering
Explain the concept of filtering within SLT
Specify your own filtering rule
Define trigger adjustments
2012 SAP AG. All rights reserved. 80
Business Example
Selective data replication / filtering
SAP HANA system SAP LT Replication Server Source system
DB
Connection
RFC
Connection
Implementation
Either by trigger adjustment in source system or
by rules (event-based or parameter-based)
Scenarios
Replicating certain data only
Only data of specific years should be used in HANA,
for instance
Replication of data active tables as they are in DDIC
tables DD02l, DD03l etc.
Reduce Number of Records to Be Replicated by Filter
2012 SAP AG. All rights reserved. 81
Concept - Filtering
Selective data replication
Conditional filter (in SLT) by parameter-based or event-based rules
To skip a record from load and replication macro SKIP_RECORD can be used
in the code of the include.
In fact, all data (means not filtered data) will be transferred from the source system to SAP LT
Replication Server, but not forwarded to HANA
means SLT system will read all data from the source and write only relevant data into HANA.
No database-specific knowledge needed
Valid for both initial load and replication
Selected delta replication (Trigger Adjustments)
Done by trigger adjustment directly of data base of the source system
Will be implemented using tabfolder in advanced Replication Settings
IUUC_SPC_PROCOPT.
For experts only
Database-specific
Will be implemented in source system
Decreases the total amount of data to be extracted from source system
Performance advantages because of reduction of triggered and transferred data
Only valid for replication data; it is not working for initial load.
2012 SAP AG. All rights reserved. 82
Example: Filtering by Company Code Selective
data replication
RESULT: Only records where
MJAHR(FiscalYear ) = 1998 were
transferred to HANA:
Realized with a
parameter rule
2012 SAP AG. All rights reserved. 83
Define the Trigger Condition
SLT based transformation concepts
Trigger condition has to be defined in folder IUUC_SPC_PROCOPT of
Advanced Replication Settings. Based on the database of the source
system, different syntaxes are adapted.
Field Action
DBSYS Enter the database type of the source system.
LINE_NO You can specify multiple lines if the condition is too complex to be filled in only one
line.
LINE Enter the trigger condition here. Only when the data change fulfills the condition , it
will be recorded into the logging table for the SLT replication.
DBSYS Syntax Sample
ADABAS D field1 = 'value0' AND field2 IN ( 'value1', 'value2' ) AS4LOCAL = 'N'
DB2 ___."field1" = 'value0' AND ___."field2" IN ( 'value1', 'value2' ) ___."AS4LOCAL" = 'N'
DB6 ___.field1 = 'value0' AND ___.field2 IN ( 'value1', 'value2' ) ___.AS4LOCAL = 'N'
MSSQL field1 = 'value0' AND field2 IN ( 'value1', 'value2' ) AS4LOCAL = 'N'
ORACLE :___.field1 = 'value0' AND :___.field2 IN ( 'value1', 'value2' ) :___. AS4LOCAL = 'N'
2012 SAP AG. All rights reserved. 84
Define the Trigger Condition
SLT based transformation concepts
In this example, we want to customize the trigger directly in the source
system in a way that only changes to the data with AS4LOCAL = N will
be recorded.
Please note: trigger filtering will only work for replication phase. If it is
required to filter the table during the initial load phase, an additional event
(or parameter) filter is also necessary!
2012 SAP AG. All rights reserved. 85
You should now be able to:
Summary
Selective data replication / filtering
Explain the benefit of filtering
Explain the concept of filtering within SLT
Specify your own filtering rule
Define trigger adjustments
Data Replication at a Glance
Positioning and Key Concepts
Overview on Configuration Aspects
Transformation of Data
SLT based transformation concepts and Advanced Replication settings
Extension of (target) table structure and Partitioning
Filtering and Selective Data Replication
Specific Considerations
Administration and Monitoring at a Glance
Appendix
Unit 8: Data Provisioning using SLT
2012 SAP AG. All rights reserved. 87
Specific considerations
Transformation Rules for Cluster Tables
Apply SAP note 1662438 at first.
After implementing the note, you should follow the steps
(table BSEG as an example):
For initial load, you should create one entry in IUUC_ASS_RUL_MAP for BSEG
and include program for BSEG table
For replication, you should create an addition entry in IUUC_ASS_RUL_MAP for
RFBLG and include program for RFBLG table
2012 SAP AG. All rights reserved. 88
Specific considerations
Performance Optimization
Default setting for initial load: Reading Type 3
The default setting is 3 jobs for each table for parallel read
If more parallel jobs are defined for parallel read than are available for loading,
the tables will be processed successively
To determine the order of table processing the sequence number (Seq. No.) can
be used.
2012 SAP AG. All rights reserved. 89
Specific considerations
Accelerated Load Procedures Reading types
Reading Type Advantages Disadvantages
1 Access Plan
Calculation
Fast data load if index
exists
Parallel data load possible
Additional index may be required
Requires a key field which is
sufficiently selective
Calculation required before load
3 DB_SETGET
(default)
No separate index required
Multi-threading possible
with DMIS_2010 SP07
Additional consumption of
database buffer
4 & 5 Index Cluster Very fast data load after
data is extracted to table
DMC_INDXCL
Minimal usage of DB buffer
Additional table space temporarily
required in the source system
Data Replication at a Glance
Positioning and Key Concepts
Overview on Configuration Aspects
Transformation of Data
SLT based transformation concepts and Advanced Replication settings
Extension of (target) table structure and Partitioning
Filtering and Selective Data Replication
Specific Considerations
Administration and Monitoring at a Glance
Appendix
Unit 8: Data Provisioning using SLT
Load from SAP Archive
Integration of SLT with SAP Solution Manager
Appendix
2012 SAP AG. All rights reserved. 92
Archived data can be selected by the date of the archiving session.
SAP HANA system SAP Source system
Load from SAP Archive 1/2
Architecture and Key Building Blocks
SAP LT Replication
Server
ADK Archive
This presentation and SAPs strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice. This document is
provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement
Structure Mapping &
Transformation
Write Module
Read Module
RFC
Connection
DB
Connection
Application Table
ADK Archive
Access API
The respective ILM API must be available in the source system. It
can be installed by means of SAP Note 1652039 (46C 731).
2012 SAP AG. All rights reserved. 93
Load from SAP Archive 2/2
Define Load Object
Select the relevant
tables within the
current archive object
Select archive object
Select replication configuration
Define selection criteria
Use report
IUUC_CREATE_ARCHIVE_OBJECT on
SLT Replication Server setup and start the
loading process for archive objects.
2012 SAP AG. All rights reserved. 94
Integration of SLT with SAP Solution Manager - Monitoring Capabilities
SAP Solution Manager is set to be the single
source of truth for monitoring and incident
management of the entire HANA stack.
Ensures proactive information about replication
status through alerting and notification
capabilities
2012 SAP AG. All rights reserved. 95
Overview - Monitoring with SAP Solution Manager 7.1 SP5
Replication notifications and
alerts are now visible in SAP
Solution Manager 7.1 SP5.
SLT monitoring summarizes the following
information per configuration:
Connectivity to source and target system
Status of latency time last 24h replication
Status of master and load jobs
Trigger status
2012 SAP AG. All rights reserved. 96
Set-Up of System Monitoring for SLT
SLT System monitoring is defined on ABAP technical system level
If DMIS Add-on is detected, SAP template SAP SLT ABAP Addon is assigned by default
2012 SAP AG. All rights reserved. 97
SLT System Monitoring - Connectivity Status
Availabile Monitoring Capabilities for SLT
Per schema the connectivity status from SLT to the source and to the target system is
monitored
2012 SAP AG. All rights reserved. 98
SLT System Monitoring Status of Latency Times
Performance Monitoring for SLT
Per schema the worst rating of average latency of the past 24 hours is reported
2012 SAP AG. All rights reserved. 99
SLT System Monitoring Status of Master and Load Jobs
Exception Monitoring for SLT
Per schema the job status for master and load jobs is monitored
2012 SAP AG. All rights reserved. 100
SLT System Monitoring Trigger Status
Exception Monitoring for SLT
Per schema the trigger status is monitored (worst case for all table triggers)
2012 SAP AG. All rights reserved. 1
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
Introduction to SAP Data Services
Loading data into SAP HANA
Unit 9: Data Acquisition using SAP Data Services
2012 SAP AG. All rights reserved. 3
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Data Acquisition using SAP Data Services
Explain Data Services capabilities with SAP HANA
Load data from SAP ECC source table into SAP HANA using an ABAP
dataflow.
2012 SAP AG. All rights reserved. 4
Solution: One-Stop Solution
for Information Management
DATA SERVICES
ETL
Data
Profiling
Data
Quality
Text
Analytics
Metadata
Management
Data Sources: Structured and Unstructured
2012 SAP AG. All rights reserved. 5
SAP Data Services Hadoop Connector
Connect unstructured & structured data for greater insight
Log Files
Media and Other
Files
Hadoop
Multi-structured
Data Sources
SAP HANA
Disk
Structured Data
I
n
-
M
e
m
o
r
y
3
Files are stored in their native
format incurring no
transformational costs.
Built in fault-tolerance.
Commodity hardware and
software solution makes Hadoop
scale cost effectively.
Integrate & Consume
3
Enterprise
Portals
On Demand
Services
Mobile
Dashboard/ Report
Data Warehouses
Sybase
IQ
SAP
BW
Collect & Store
1
Read from / load into Hadoop
Familiar, easy-to-use Data Services UI
Enterprise support and Integration
into enterprise infrastructure
Analyze & Process
2
Prepare the data to enable the
class of problems to be solved.
Problems like searching, counting,
pattern detection lend themselves
well to Map Reduce paradigm
2
1
Map-Reduce, is a parallel
processing paradigm where code is
sent to data for instant processing
2012 SAP AG. All rights reserved. 6
SAP Data Services SAP HANA
Extract, transform, and load data quickly
Any Source
Data Load
Metadata
Open Hub
SAP Data Services
In-Memory
Computing Engine
Modeler
SAP HANA
BW
Repository
Server
Designer and
Management
Console
2012 SAP AG. All rights reserved. 7
SAP Data Services 4.0 SP2 with SAP HANA Database
SAP AG 2012
SAP Data Services 4.0 SP2 is the minimum release to work with HANA 1.0 SP4
Performance improvements for loading HANA
Option in the HANA target for commit size will allow for better tuning.
Option to choose column or row type of table in Template tables.
Support for Bulk Updates in SAP HANA (through an intermediate staging table)
Direct UPDATE and DELETE statements via ODBC are slow.
Option to load all data into a temporary table in HANA, together with an operation code to indicate
this row is an INSERT/UPDATE/DELETE.
Once all data is in the temporary table a SQL statement get issued to HANA to apply the
INSERTS/UPDATES/DELETES to the actual target.
Overall this gives a big performance gain because Data Services is only generating (bulk)
INSERTs, and the actual UPDATEs/DELETEs are all executed in memory in the HANA engine.
Improved ABAP integration to ERP
ODP Operational Data Provider Framework
New SAP delivered API implemented on the ERP side
2012 SAP AG. All rights reserved. 8
Full extractor support through ODP
Full extractor support through ODP data replication API:
Data Services can use this API to get initial and delta loads, the data can be
streamed to Data Services.
Main points:
Only released extractors are shown to Data Services.
Business Suite team releases standard extractors as they are certified for ODP
Customer can release generic extractors using transaction RODPS_OS_EXPOSE
Delta support through the delta queues (same mechanism as used by BW today)
Data is streamed from SAP to Data Services.
Overall DS-specific subset of overall ODP functionality released with ECC 6.0 EhP6.
Standard extractors need to be released by the Business Suite team
Introduction to SAP Data Services
Loading data into SAP HANA
Unit 9: Data Acquisition using SAP Data Services
2012 SAP AG. All rights reserved. 10
Process Flow: SAP HANA and SAP Data Services 4
Execute a Data
Services job to
populate SAP
HANA
Preview
uploaded
data
Create a
connection to
SAP HANA
Create a
connection to a
SAP source
system
Import metadata
from SAP BW
Extractor to
Data Services
Repository
Design a Data
Services job to
populate SAP
HANA
2012 SAP AG. All rights reserved. 11
Standard vs ABAP Dataflows
ABAP Dataflow can be used if you have the following requirements:
reading multiple ECC tables.
push down any join operations to the SAP Application.
better performance
Standard Dataflow can be used if you have the following requirements:
reading a single table
small number of columns (data load buffer resticted to 512 Bytes per row.
2012 SAP AG. All rights reserved. 12
What is an ABAP Dataflow?
Transport File
SAP Data Services SAP Application
IDOCs
Access Server
SAP database
SAP databases
Job Server
Load
Send program
Read
BAPI
calls
Read
ABAP data flow
Data flow
2012 SAP AG. All rights reserved. 13
What is an ABAP Dataflow?
Target
Data Flow
R/3 data flow
DataTransport976
Data
Transport
Query Source(s)
SNWD_SO_I(ECC.) Query
2012 SAP AG. All rights reserved. 14
Using Data Services Template Tables
If the structures of the tables are similar or identical to the tables in the source system,
then its not necessary import the meta data prior to executing the Data Services Job.
Data Services provides a Template Tables functionality which executes a SQL
statement in the target database prior to the data load which generates the meta data.
1 Inside the HANA Data Store
select Template Tables, drop it into
the Data flow
2 Enter Table name and
Owner name (Owner
name = schema name)
3 Map the source
structure to the
template table
2012 SAP AG. All rights reserved. 15
Steps to load data into SAP HANA using an ABAP
Dataflow
Step 1: Create ECC and SAP HANA Datastores in the repository.
2012 SAP AG. All rights reserved. 16
Steps to load data into SAP HANA using an ABAP
Dataflow
Step 2: Import the ECC table or extractor metadata into the repository.
2012 SAP AG. All rights reserved. 17
Steps to load data into SAP HANA using an ABAP
Dataflow
Step 3: Create a Batch Job and add an ABAP dataflow
2012 SAP AG. All rights reserved. 18
Steps to load data into SAP HANA using an ABAP
Dataflow
Step 4: Add the ECC source, Query transform and Data Transport in the
workspace of the ABAP dataflow.
Double click on ABAP data
flow to drill down
2012 SAP AG. All rights reserved. 19
Steps to load data into SAP HANA using an ABAP
Dataflow
Step 5: Do the mappings in the Query transforms
2012 SAP AG. All rights reserved. 20
Steps to load data into SAP HANA using an ABAP
Dataflow
Step 6: Execute the job and monitor
2012 SAP AG. All rights reserved. 21
Steps to load data into SAP HANA using an ABAP
Dataflow
Step 7: Preview data in SAP HANA
2012 SAP AG. All rights reserved. 22
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
Data Acquisition using SAP Data Services
Explain Data Services capabilities with SAP HANA
Load data from SAP ECC source table into SAP HANA using an
ABAP dataflow.
2012 SAP AG. All rights reserved. 1
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
Introduction to Flat File Upload
Loading flat file data into SAP HANA
Unit 10: Uploading Data from Flat Files
2012 SAP AG. All rights reserved. 3
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Data Acquisition using Flat File Data Load
Understand the capabilities and positioning of the Flat file data load
functionality
Load data from Flat Files into the SAP HANA Database
2012 SAP AG. All rights reserved. 4
New feature in SPS4: Uploading data from flat files
With SPS4, its possible to upload data from flat files, available at client file
system, to SAP HANA database
If the required table for loading the data does not exist in SAP HANA database, its
necessary to create a table structure that is based on the flat files
The application suggests the column names and data types for the new tables and its
possible to edit them
The new table always has a 1:1 mapping between the file and table columns
When loading new data in the table, it gets appended to the existing data
The application does not allow to overwrite any column or change the data type of
existing data
The supported file types are: .csv, .xls, and .xlsx
Especially suited for Proof of Concepts or projects where only an one-time data load is
required
+ Quick and easy data load
- No delta logic available; no transformation capabilities 1:1 mapping only
Introduction to Flat File Upload
Loading flat file data into SAP HANA
Unit 10: Uploading Data from Flat Files
2012 SAP AG. All rights reserved. 6
Process Flow: Uploading data from flat files
Manage Table
Definition and
Data Mapping
Check
Target
Table
Select File for
Upload
Select Import
Source
Select Target
System
Select Target
Table
2012 SAP AG. All rights reserved. 7
Select Import Source
In the File Menu, choose import
Expand the SAP HANA Content directory
Select Data From Local File and choose
Next
Manage Table
Definition and
Data Mapping
Check
Target
Table
Select File for
Upload
Select Import
Source
Select Target
System
Select Target
Table
2012 SAP AG. All rights reserved. 8
Select Target System
In the Target System section, select
the Target System where the data
should be imported
Choose Next
Manage Table
Definition and
Data Mapping
Check
Target
Table
Select File for
Upload
Select Import
Source
Select Target
System
Select Target
Table
2012 SAP AG. All rights reserved. 9
Select File for Upload
In the Flat File Upload screen, browse for the file which should
be uploaded into SAP HANA database
If a .xls or .xlsx file has been selected, choose the corresponding
worksheet
If a .csv File has been selected, select a delimiter
If a header row exists in the flat file, select Header row exists and
enter row number
If only a specific row range should be relevant for the import,
remove check for Import all data and enter the start / end line
Note:
A delimiter is used to determine columns and pick correct data
against them. In a .csv file, the accepted delimiters are: , ;
Manage Table
Definition and
Data Mapping
Check Target
Table
Select File for
Upload
Select Import
Source
Select Target
System
Select Target
Table
2012 SAP AG. All rights reserved. 10
Select Target Table
For the Target Table, two options are available:
New: When selecting New, a new table with the
name entered will be generated within the
schema chosen.
Existing: When selecting Existing, data will be
appended to an existing table.
Choose Next
Manage Table
Definition and
Data Mapping
Check Target
Table
Select File for
Upload
Select Import
Source
Select Target
System
Select Target
Table
2012 SAP AG. All rights reserved. 11
Manage Table Definition and Data Mapping
In the Manage Table
Definition and Data
Mapping screen its
possible to map the source
and the target columns
The application proposes a
mapping structure
automatically based on the
naming
Additionally its required to
select a Key
Note: Only 1:1 column mapping is supported. Additionally, its
possible to edit the table definition by changing the store type,
data types, renaming, adding or deleting columns
Manage Table
Definition and
Data Mapping
Check Target
Table
Select File for
Upload
Select Import
Source
Select Target
System
Select Target
Table
2012 SAP AG. All rights reserved. 12
Manage Table Definition and Data Mapping
Its possible to preview the data based on the flat file chosen
Select Finish to finalize the creation process
Manage Table
Definition and
Data Mapping
Select File for
Upload
Select Import
Source
Select Target
System
Select Target
Table
Check Target
Table
2012 SAP AG. All rights reserved. 13
Check Target Table
The table should be available within the schema defined
during process step Select Target Table
Double click table to see table definition
Manage Table
Definition and Data
Mapping
Check
Target Table
Select File for
Upload
Select Import
Source
Select Target
System
Select Target
Table
2012 SAP AG. All rights reserved. 14
Check Target Table
Right click table and select Data Preview
Manage Table Definition
and Data Mapping
Check
Target Table
Select File for
Upload
Select Import
Source
Select Target
System
Select Target
Table
2012 SAP AG. All rights reserved. 15
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
Data Acquisition using Flat File Data Load
Understand when to use Flat File data load functionality
How to load data from Flat Files into the SAP HANA Database
2012 SAP AG. All rights reserved. 1
Agenda
SAP HANA Implementation and Modeling
Unit 1: Approaching SAP HANA Modeling
Unit 3: Advanced Modeling
Unit 2: Connecting Tables
Unit 4: Full Text Search
Unit 5: Processing Information Models
Unit 6: Managing Modeling Content
Unit 7: Security and Authorizations
Unit 8: Data Provisioning using SLT
Unit 9: Data Provisioning using SAP Data Services
Unit 10: Data Provisioning using Flat File Upload
Unit 11: Data Provisioning using Direct Extractor Connection
Comparison with other SAP HANA Data Acquisition Techniques
Overview
SAP HANA Direct Extractor Connection Setup & Configuration
Appendix: DXC Sidecar Variation
SAP HANA Direct Extractor Connection Details
Rationale SAP HANA Direct Extractor Connection (DXC)
SAP Business Content DataSource Extractors
Unit 11: SAP HANA Direct Extractor Connection
2012 SAP AG. All rights reserved. 3
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Direct Extractor Connection
Explain an additional data acquisition technique for working with data
from SAP Business Suite systems that has been added to the existing
techniques for HANA data acquisition.
2012 SAP AG. All rights reserved. 4
This module covers the following topics:
2012 SAP AG. All rights reserved.
Overview
Direct Extractor Connection
Overview
2012 SAP AG. All rights reserved. 5 2012 SAP AG. All rights reserved.
Overview
SAP HANA Direct Extractor Connection
An additional data acquisition technique for working with data from SAP
Business Suite systems has been added to the existing techniques for HANA
data acquisition:
SLT Replication
Data Services
and now
SAP HANA Direct Extractor Connection (DXC)
2012 SAP AG. All rights reserved. 6 2012 SAP AG. All rights reserved.
Overview
SAP HANA DXC Concept: Illustration
SAP ERP SAP HANA
Data flow redirected
from embedded BW:
transferred over http
connection
Data models in HANA are
built using active data table
of In-Memory DataStore
object
Extractor
DataSource (flat structure)
ERP data
InfoCubes
Data Store Objects
InfoObjects
Embedded BW
generic data transfer
DataSource
Generic data transfer
In memory DSO
Activation
Processing
Data load into HANA activation queue
Separate activation step
Scheduled batch jobs
PSA
Status
Active
Version
Activation
Queue
2012 SAP AG. All rights reserved. 7
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
User Management & Security
Explain an additional data acquisition technique for
working with data from SAP Business Suite systems
that has been added to the existing techniques for
HANA data acquisition.
Comparison with other SAP HANA Data Acquisition Techniques
Overview
SAP HANA Direct Extractor Connection Setup & Configuration
Appendix: DXC Sidecar Variation
SAP HANA Direct Extractor Connection Details
Rationale SAP HANA Direct Extractor Connection (DXC)
SAP Business Content DataSource Extractors
Unit 11: SAP HANA Direct Extractor Connection
2012 SAP AG. All rights reserved. 9
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Direct Extractor Connection
Explain the rationale SAP HANA Direct Extractor Connection (DXC)
2012 SAP AG. All rights reserved. 10
This module covers the following topics:
2012 SAP AG. All rights reserved.
Overview
Direct Extractor Connection
Rationale SAP HANA Direct Extractor Connection (DXC)
2012 SAP AG. All rights reserved. 11 2012 SAP AG. All rights reserved.
Pre-Existing Foundational Data Models of
SAP Entities for use in SAP HANA
DXC Benefits:
Leverage SAP Delivered Business Content DataSources Which
are existing foundational data models for key entities in SAP Business
Suite systems
Significantly reduces complexity of data modeling tasks in SAP HANA
Speeds up timelines for customers implementation projects
Challenges
Data stored in many various tables, with high complexity in many modules of SAP
Business Suite systems
LT real-time approach Uses base tables in the SAP Business Suite as a basis for data
modeling of SAP Business Suite entities
Project solution: Model SAP entities from scratch
In some cases Big challenges b/c of high complexity in the SAP Business Suite
system
2012 SAP AG. All rights reserved. 12 2012 SAP AG. All rights reserved.
Provides Semantically Rich Data from
SAP Business Suite to SAP HANA
Challenges
In many modules of SAP Business Suite systems Application logic needed to have
semantically rich data (data appropriately reflecting the state of business documents)
LT real-time approach Uses base tables in the SAP Business Suite as a basis for
data modeling Semantically rich data not provided out of the box
Project solution: Implement business logic from scratch to properly represent SAP
Business Suite data
It can be extremely challenging to determine proper application logic to implement on a project
basis in SAP HANA (depending on use case)
DXC Benefits
DXC uses SAP DataSource Extractors provides semantically rich data out of the
box
Ensures the data appropriately represents the state of business documents
from ERP
Application logic to make sense of the data already built into many
extractors
Avoid potentially difficult work of reinventing the wheel on a project basis in HANA ->
reimplement application logic in HANA which is already provided in DataSource extractors
2012 SAP AG. All rights reserved. 13 2012 SAP AG. All rights reserved.
Simplicity / Low TCO
Challenges
Some use cases require straightforward use of SAP ERP data Simple interface desired
System landscape impact of other data acquisition techniques
LT real-time Separate NetWeaver instance in system landscape
DataServices ETL tool, Separate BOE-instance in system landscape
DataServices Requires an SP from March 2011 on the ERP system to use SAP
DataSource Extractors (1522554 /Note:1558737)
DXC Benefits
DXC provides a very simple, straightforward interface, re-uses existing extractors in SAP
ERP
HTTP-Connection directly from SAP Business Suite to HANA
TCO advantages (Due to simplicity, minimal system landscape impact)
DXC is available simply by applying a note (In most cases)
Re-use widely available skill-sets
BW extraction and load is well-known in the industry
2012 SAP AG. All rights reserved. 14 2012 SAP AG. All rights reserved.
Activation Mechanism for Handling Delta
Processing
Challenges
Many SAP Business Content DataSources offer delta processing, aka change data capture
Extraction only sends data created, changed, or deleted since the last
extraction run Efficiency
Some DataSource extractor types deliver data with special properties It should not be simply
loaded directly into a table in HANA This would cause incorrect results in reports
Delta processing types AIM, AIE, AIED, AIMD, ADD, ADDD and CUBE
require data to be loaded into a DataStore Object (DSO) Activation
processing is important for data correctness
Standard DSOs in BW include an activation mechanism, which handles the
special properties of this data appropriately (e.g. after image only, overwrite,
deletion flag, etc.)
Without DXC, HANA standalone cannot properly handle data from the
aforementioned types
DXC Benefits
DXC provides a special In-Memory DataStore Object (IMDSO) for use in HANA standalone
IMDSO Includes the same activation mechanism features as BW DSOs
IMDSO properly handles special requirements of extractor types such as AIM
and AIMD, which need DSO activation ensures correct data in reports
IMDSO ensures proper sequencing, overwrite, deletion of data, etc.
2012 SAP AG. All rights reserved. 15
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
User Management & Security
Explain the rationale SAP HANA Direct Extractor Connection (DXC)
Comparison with other SAP HANA Data Acquisition Techniques
Overview
SAP HANA Direct Extractor Connection Setup & Configuration
Appendix: DXC Sidecar Variation
SAP HANA Direct Extractor Connection Details
Rationale SAP HANA Direct Extractor Connection (DXC)
SAP Business Content DataSource Extractors
Unit 11: SAP HANA Direct Extractor Connection
2012 SAP AG. All rights reserved. 17
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Direct Extractor Connection
Explain the SAP HANA Direct Extractor Connection in details
2012 SAP AG. All rights reserved. 18
This module covers the following topics:
2012 SAP AG. All rights reserved.
Overview
Direct Extractor Connection
SAP HANA Direct Extractor Connection Details
2012 SAP AG. All rights reserved. 19 2012 SAP AG. All rights reserved.
SAP HANA Direct Extractor Connection
Details
In typical business suite systems, the embedded BW is not utilized
Customers typically have separate BW systems
DXC uses the embedded BW system to enable extraction and
monitoring only
Data flow is redirected It gets sent to HANA
Note: Modeling in the embedded BW is not part of the DXC solution
Note: An architectural variation available, which uses a sidecar BW
instead of the embedded one. See appendix for details.
2012 SAP AG. All rights reserved. 20 2012 SAP AG. All rights reserved.
SAP HANA Direct Extractor Connection
Details
The extraction from the SAP Business Suite system -> controlled from
the Data Warehousing workbench inside the embedded BW
When data is extracted from, the SAP Business Suite system, it is not loaded into
the PSA of the embedded BW instead it is redirected and sent to HANA
It gets loaded into in-memory DSOs activation queue
Then activated into the active table of the in-memory
However, in the data load monitor of the embedded BW, the data load
into the activation queue in the DSO in HANA appears like data is
loading into the PSA in the embedded BW
2012 SAP AG. All rights reserved. 21 2012 SAP AG. All rights reserved.
SAP HANA Direct Extractor Connection
Details
Delta processing (aka change data capture)
Works the same for DXC as it would if BW were the receiving system
If the DataSource is delta enabled, then delta-enabled data is available with SAP HANA Direct
Extractor Connection
DXC internally in HANA uses the ICM (Internet Connectivity Manager)
receives XML packages over the http(s) connection
Mechanism written on the XS Engine (special component for HANA)
Receives data packets from ICM, converts format
Inserts the records into the activation queue of the in-memory DSO
Activation processing records are go into the active table in proper sequence
Both the ICM and XS Engine components must be installed in SAP
HANA to utilize DXC
2012 SAP AG. All rights reserved. 22 2012 SAP AG. All rights reserved.
SAP HANA Direct Extractor Connection
Details
Limitations for DXC
Business Suite System based on NetWeaver 7.0 or higher (e.g. ECC) with at
least the following
SP level:
Release 700 SAPKW70021 (SP stack 19, from Nov 2008)
Release 701 SAPKW70104
Release 702 SAPKW70201
Release 730 SAPKW73001
DataSource must have a key field defined
Procedure exists to define a key if one is not already defined
Certain DataSources may have specific limitations
Inventory types, e.g. 2LIS_03_BF data requires special features only
available in BW
Certain Utilities DataSources can work with one and only one receiving
system
Some DataSources are not delta enabled not a specific issue for DXC or
HANA, but something to take into account
2012 SAP AG. All rights reserved. 23 2012 SAP AG. All rights reserved.
SAP HANA Direct Extractor Connection
SAP Business Suite DataSource Extractors Example from
Sales Order Item Content
HANA Data Models - virtual
Activation Queue table: /BIC/A
2LIS_11_VAITM40
In-Memory Data Store Object Tables:
Active table: /BIC/A 2LIS_11_VAITM00
Activation Processing
Data flow redirected from embedded BW
SAP HANA
SAP ERP
Communication Structure
Setup Table
DataSource for transactional
data 2LIS_11_VAITM
Application Tables
Sales Order
Delta Queue
Update Methods
Init/Full
Application logic
Update Mode
Delta
Extract StruktureMC11VA0ITM
Transfer Structure
TRFCQOUT
ARFCSDATA
ARFCSSTATE
MCVBAK
MCVBAP
2012 SAP AG. All rights reserved. 24
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
User Management & Security
Explain the SAP HANA Direct Extractor Connection in details
Comparison with other SAP HANA Data Acquisition Techniques
Overview
SAP HANA Direct Extractor Connection Setup & Configuration
Appendix: DXC Sidecar Variation
SAP HANA Direct Extractor Connection Details
Rationale SAP HANA Direct Extractor Connection (DXC)
SAP Business Content DataSource Extractors
Unit 11: SAP HANA Direct Extractor Connection
2012 SAP AG. All rights reserved. 26
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Direct Extractor Connection
Explain the SAP Business Content DataSource Extractors
2012 SAP AG. All rights reserved. 27
This module covers the following topics:
2012 SAP AG. All rights reserved.
Overview
Direct Extractor Connection
SAP Business Content DataSource Extractors
2012 SAP AG. All rights reserved. 28 2012 SAP AG. All rights reserved.
SAP Business Content DataSource Extractors
Overview
SAP Business
Suite
Proprietary Extraction Technology
Application based change data capture (aka delta
capabilities)
Extractors are application based and take data from the
context of the application itself
Extraction is event/process driven and (in some cases) is
accomplished with publishing new or changed data in ERP
based Delta Queues for receiving systems (e.g. BW or
HANA)
Extract structures can easily be enhanced using append
structures
Transformations can be implemented at the time of
extraction using Business Add Ins (BADIs)
Extract Structures based on entities in the Business Suite
Asynchronous, mass data capable extraction
2012 SAP AG. All rights reserved. 29 2012 SAP AG. All rights reserved.
transactional data master data attributes master data text master data hierarchy
Transactional
data
Master data Texts Hierarchies
ERP &
R/3
900 700 2300 100 4000
CRM 160 280 700 40 1180
SRM 30 30 60 10 130
Others 360 210 330 30 930
GRC 20 30 120 10 180
1470 1250 3510 190 6420
SAP Business Content DataSource Extractors
Thousands of SAP Business Content DataSources Exist
Totals
business documents
master data
2012 SAP AG. All rights reserved. 30
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
User Management & Security
Explain the SAP Business Content DataSource Extractors
Comparison with other SAP HANA Data Acquisition Techniques
Overview
SAP HANA Direct Extractor Connection Setup & Configuration
Appendix: DXC Sidecar Variation
SAP HANA Direct Extractor Connection Details
Rationale SAP HANA Direct Extractor Connection (DXC)
SAP Business Content DataSource Extractors
Unit 11: SAP HANA Direct Extractor Connection
2012 SAP AG. All rights reserved. 32
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Direct Extractor Connection
Explain SAP HANA Direct Extractor Connection Setup &
Configuration
2012 SAP AG. All rights reserved. 33
This module covers the following topics:
2012 SAP AG. All rights reserved.
Overview
Direct Extractor Connection
SAP HANA Direct Extractor Connection Setup & Configuration
2012 SAP AG. All rights reserved. 34
Setup & configuration
Relevant notes
All relevant information related to setup & configuration is provided by
Note 1665602 - Setup & Config: SAP HANA Direct Extractor Connection (DXC)
Note 1583403 - Direct extractor connection to SAP HANA
2012 SAP AG. All rights reserved. 35
Setup & configuration
Relevant notes
All relevant information related to setup & configuration is provided by
Note 1665602 - Setup & Config: SAP HANA Direct Extractor Connection (DXC)
Note 1583403 - Direct extractor connection to SAP HANA
2012 SAP AG. All rights reserved. 36 2012 SAP AG. All rights reserved.
Step 1: Enabling XSEngine and ICM Service
2012 SAP AG. All rights reserved. 37 2012 SAP AG. All rights reserved.
Step 2: Delivery Unit Import
Result
2012 SAP AG. All rights reserved. 38 2012 SAP AG. All rights reserved.
Step 3: Application Server Configuration
2012 SAP AG. All rights reserved. 39 2012 SAP AG. All rights reserved.
Step 4: Creating a DXC User in SAP HANA
Create a user who has the privileges to
execute the DXC extraction and load.
Add the roles PUBLIC and MONITORING
2012 SAP AG. All rights reserved. 40 2012 SAP AG. All rights reserved.
Step 5: Creating a DXC Schema in SAP HANA
2012 SAP AG. All rights reserved. 41 2012 SAP AG. All rights reserved.
Step 6: Create an HTTP Connection to the SAP
HANA System
2012 SAP AG. All rights reserved. 42 2012 SAP AG. All rights reserved.
Step 7: Configure DXC HTTP Interface Destination
and maintain DataSource parameters
2012 SAP AG. All rights reserved. 43 2012 SAP AG. All rights reserved.
Step 7: Configure DXC HTTP Interface Destination
and maintain DataSource parameters
2012 SAP AG. All rights reserved. 44 2012 SAP AG. All rights reserved.
Step 7: Configure DXC HTTP Interface Destination
and maintain DataSource parameters
2012 SAP AG. All rights reserved. 45 2012 SAP AG. All rights reserved.
Step 7: Configure DXC HTTP Interface Destination
and maintain DataSource parameters
2012 SAP AG. All rights reserved. 46 2012 SAP AG. All rights reserved.
Step 8: Configuration Steps Specific to SAP
Business Warehouse
Replicate DataSources
Result in HANA (IMDSO)
2012 SAP AG. All rights reserved. 47 2012 SAP AG. All rights reserved.
Step 8: Configuration Steps Specific to SAP
Business Warehouse
Replicate DataSources
Result in HANA (IMDSO)
2012 SAP AG. All rights reserved. 48 2012 SAP AG. All rights reserved.
Step 9: Create InfoPackages
2012 SAP AG. All rights reserved. 49 2012 SAP AG. All rights reserved.
Step 10: Scheduling and Monitoring
Monitor Data Load in the Source SAP Business Suite System
Verifying Data Transfer in the SAP HANA Database
Create a Process Chain for Regular Data Transfer
2012 SAP AG. All rights reserved. 50 2012 SAP AG. All rights reserved.
Step 10: Scheduling and Monitoring
Monitor Data Load in the Source SAP Business Suite System
Verifying Data Transfer in the SAP HANA Database
Create a Process Chain for Regular Data Transfer
2012 SAP AG. All rights reserved. 51 2012 SAP AG. All rights reserved.
Step 11: Monitoring the Activation Process of
IMDSO
2012 SAP AG. All rights reserved. 52 2012 SAP AG. All rights reserved.
Step 11: Monitoring the Activation Process of
IMDSO
2012 SAP AG. All rights reserved. 53 2012 SAP AG. All rights reserved.
Step 12: Setup Email Alerting for the Activation
Process
2012 SAP AG. All rights reserved. 54 2012 SAP AG. All rights reserved.
Step 12: Setup Email Alerting for the Activation
Process
2012 SAP AG. All rights reserved. 55
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
User Management & Security
Explain SAP HANA Direct Extractor Connection Setup &
Configuration
Comparison with other SAP HANA Data Acquisition Techniques
Overview
SAP HANA Direct Extractor Connection Setup & Configuration
Appendix: DXC Sidecar Variation
SAP HANA Direct Extractor Connection Details
Rationale SAP HANA Direct Extractor Connection (DXC)
SAP Business Content DataSource Extractors
Unit 11: SAP HANA Direct Extractor Connection
2012 SAP AG. All rights reserved. 57
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Direct Extractor Connection
Explain the Comparison with other SAP HANA Data Acquisition Techniques
2012 SAP AG. All rights reserved. 58
This module covers the following topics:
2012 SAP AG. All rights reserved.
Overview Direct Extractor Connection
Comparison with other SAP HANA Data Acquisition Techniques
2012 SAP AG. All rights reserved. 59 2012 SAP AG. All rights reserved.
Comparison with other SAP HANA Data
Acquisition Techniques Contrast with Data Services
Direct Extractor Connection SAP Data Services
ETL type: Simple and straightforward ETL approach; no
premium features
SAP DataSources: available for all SAP Business Content
DataSources (Extractors) and Generic DataSources with a
defined key; key can be defined if missing
Support Package Requirement: SP required in the source
SAP Business Suite system that came out in March 2008;
DXC is implemented by applying a special SAP note
Delta handling (change data capture): Yes, for all SAP
Business Content DataSources and all delta processing
types; uses an In-Memory DSO with activation processing
Software: Uses existing components in SAP HANA (XS
Engine, ICM); configuration file imported into SAP HANA
Transformations: very limited - BADI (ABAP) in extraction
exit available. When extensive transformations are required,
its recommended to use DataServices
ETL type: Sophisticated ETL tool with extensive valuable
features (data quality, metadata mgmt, transformations,
etc.)
SAP DataSources: available for SAP Business Content
DataSources (Extractors), limited to the subset of
DataSources released to Operational Data Provider
Support Package Requirement: SP must be applied to
the source SAP Business Suite system that came out in
March 2011 see SAP note 1522554
Delta handling (change data capture): Yes, except for
SAP Business Content DataSources with delta processing
types AIM, AIE, AIED, AIMD, ADD, ADDD, CUBE
Software Requirement: BusinessObjects Enterprise and
DataServices required
Transformations: extensive transformation capabilities
available in the DataServices ETL tool
2012 SAP AG. All rights reserved. 60 2012 SAP AG. All rights reserved.
Comparison with other SAP HANA Data Acquisition
Techniques
Contrast with SLT
Direct Extractor Connection
SAP Landscape Transformation
Type: Batch-driven ETL. Data comes from SAP delivered
Business Content DataSource extractors
Real-Time: No. Once every 15 minutes approx. theoretical
maximum (depends on DataSource)
Delivered Foundational Data Models for SAP Entities:
Yes
Semantically Rich Data: Yes, via SAP delivered
Business Content DataSource extractors
System Landscape: Nothing added, uses existing
components in SAP HANA
Project Acceleration for Data Marts in HANA:
Significant benefit
Transformations: Limited, BADI in extraction exit
available
Type: Trigger-based table replication. Data comes from base
tables of SAP Business Suite systems
Real-Time: Yes. Expected lag time typically less than 3
seconds
Delivered Foundational Data Models for SAP Entities:
Generally no; some RDS content available
Semantically Rich Data: No. Semantics must be
implemented on a project basis in SAP HANA
System Landscape: SAP NetWeaver 7.01 instance (SLT)
required
Project Acceleration Building Data Marts in HANA:
Available with some RDS packages
Transformations: Some available as of SP3
2012 SAP AG. All rights reserved. 61 2012 SAP AG. All rights reserved.
Comparison with other SAP HANA Data
Acquisition Techniques
Supported Capability Matrix Part 1 Data from Tables
* See SAP Note 1513496 for official release limitations
2012 SAP AG. All rights reserved. 62 2012 SAP AG. All rights reserved.
Comparison with other SAP HANA Data
Acquisition Techniques
Supported Capability Matrix Part 1 Data from Tables
* See SAP Note 1513496 for official release limitations
2012 SAP AG. All rights reserved. 63 2012 SAP AG. All rights reserved.
Comparison with other SAP HANA Data
Acquisition Techniques
Supported Capability Matrix Part 2 - Extractors
* See SAP Note 1513496 for official release limitations
2012 SAP AG. All rights reserved. 64
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
User Management & Security
Explain the Comparison with other SAP HANA Data Acquisition
Techniques
Comparison with other SAP HANA Data Acquisition Techniques
Overview
SAP HANA Direct Extractor Connection Setup & Configuration
Appendix: DXC Sidecar Variation
SAP HANA Direct Extractor Connection Details
Rationale SAP HANA Direct Extractor Connection (DXC)
SAP Business Content DataSource Extractors
Unit 11: SAP HANA Direct Extractor Connection
2012 SAP AG. All rights reserved. 66
At the end of this Lesson you will be able to:
2012 SAP AG. All rights reserved.
Objectives
Direct Extractor Connection
Explain the DXC Sidecar Variation
2012 SAP AG. All rights reserved. 67
This module covers the following topics:
2012 SAP AG. All rights reserved.
Overview
Direct Extractor Connection
DXC Sidecar Variation
2012 SAP AG. All rights reserved. 68 2012 SAP AG. All rights reserved.
Appendix: DXC Sidecar Variation
SAP HANA Direct Extractor Connection: Sidecar
Rationale
Customers with older Business Suite systems (lower than ones based on NetWeaver
7.0, e.g. ERP 4.7 or lower) or customers who do not want to use the embedded BW
now have an alternative: The Sidecar variation
Customers with a BW system connected can use that BW as the bridge between ERP
and HANA (via DXC) the same mechanism as with the embedded BW, but its
external from the source ERP system.
DXC utilizing a sidecar BW 7.x or ORANGE (BW on HANA)
Data flow is redirected from within BW 7.x sidecar or Orange (BWon HANA) - Data is
not loaded into BW gets redirected to HANA
No concurrent consumption (Means a DataSource can be used either in the
connected BW or with DXC cannot be used for both!)
Apply SAP note 1583403 in BW
Apply SAP note in ERP (minor enhancement, minimum risk)
2012 SAP AG. All rights reserved. 69 2012 SAP AG. All rights reserved.
Appendix: DXC Sidecar Variation
SAP HANA DXC Concept: Illustration Embedded BW
Data load into HANA activation queue
Separate activation step
Scheduled batch jobs
SAP ERP SAP HANA
Embedded BW
In memory DSO
Active
Version
Activation
Queue
Activation
Processing
Status
Data flow redirected from
embedded BW: transferred
over http connection
Extractor
DataSource (flat structure)
ERP data
DataSource
Generic data transfer
PSA
InfoCubes
Data Store Objects
InfoObjects
generic data transfer
Data models in HANA are built using
active data table of In-Memory
DataStore object
2012 SAP AG. All rights reserved. 70 2012 SAP AG. All rights reserved.
Appendix: DXC Sidecar Variation
SAP HANA DXC Concept: Illustration Standalone BW
SAP ERP
SAP HANA BW 7.x
Extractor
DataSource (flat structure)
ERP data
DataSource
Generic data transfer
PSA
InfoCubes
Data Store
Objects
InfoObjects
generic data transfer
Data flow redirected to
Hana: transferred over http
connection
In memory DSO
Activation
Processing
Status
Active
Version
Activation
Queue
Data load into HANA activation queue
Separate activation step
Scheduled batch jobs
2012 SAP AG. All rights reserved. 71
You should now be able to:
2012 SAP AG. All rights reserved.
Summary
Direct Extractor Connection
Overview
Explain the rationale SAP HANA Direct Extractor Connection (DXC)
Explain the SAP Business Content DataSource Extractors
Explain SAP HANA Direct Extractor Connection Setup &
Configuration
Explain the Comparison with other SAP HANA Data Acquisition
Techniques
2012 SAP AG. All rights reserved. 72
2012 SAP AG. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose
without the express permission of SAP AG. The information contained herein may be
changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary
software components of other software vendors.
Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are
registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x,
System z, System z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power
Architecture, Power Systems, POWER7, POWER6+, POWER6, POWER, PowerHA,
pureScale, PowerPC, BladeCenter, System Storage, Storwize, XIV, GPFS, HACMP,
RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli,
Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the United States and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered
trademarks of Adobe Systems Incorporated in the United States and other countries.
Oracle and Java are registered trademarks of Oracle and its affiliates.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin
are trademarks or registered trademarks of Citrix Systems Inc.
HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C

,
World Wide Web Consortium, Massachusetts Institute of Technology.
Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C,
Retina, Safari, Siri, and Xcode are trademarks or registered trademarks of Apple Inc.
IOS is a registered trademark of Cisco Systems Inc.
RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry
Torch, BlackBerry Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App
World are trademarks or registered trademarks of Research in Motion Limited.
Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps,
Google Mobile Ads, Google Mobile Updater, Google Mobile, Google Store, Google Sync,
Google Updater, Google Voice, Google Mail, Gmail, YouTube, Dalvik and Android are
trademarks or registered trademarks of Google Inc.
INTERMEC is a registered trademark of Intermec Technologies Corporation.
Wi-Fi is a registered trademark of Wi-Fi Alliance.
Bluetooth is a registered trademark of Bluetooth SIG Inc.
Motorola is a registered trademark of Motorola Trademark Holdings LLC.
Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer,
StreamWork, SAP HANA, and other SAP products and services mentioned herein as well
as their respective logos are trademarks or registered trademarks of SAP AG in Germany
and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal
Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services
mentioned herein as well as their respective logos are trademarks or registered trademarks
of Business Objects Software Ltd. Business Objects is an SAP company.
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase
products and services mentioned herein as well as their respective logos are trademarks or
registered trademarks of Sybase Inc. Sybase is an SAP company.
Crossgate, m@gic EDDY, B2B 360, and B2B 360 Services are registered trademarks of
Crossgate AG in Germany and other countries. Crossgate is an SAP company.
All other product and service names mentioned are the trademarks of their respective
companies. Data contained in this document serves informational purposes only. National
product specifications may vary.
The information in this document is proprietary to SAP. No part of this document may be
reproduced, copied, or transmitted in any form or for any purpose without the express prior
written permission of SAP AG.
Copyright