Sie sind auf Seite 1von 24

2013 SAP AG or an SAP affiliate company. All rights reserved.

26
How can my ABAP code benefit from SAP HANA?
Recommendations
Possibility to use HANA-specific features
Code running on all supported database systems
Prefer Advanced ABAP database programming features to optimize ABAP code
advanced Open SQL
advanced ABAP view building
use ABAP-managed procedures where needed,
but think of fallbacks in case the code also has to
support traditional database systems
Use SAP HANA content integration
if requirements cannot be fulfilled by Advanced
ABAP database programming
to consume pre-packaged content (e.g. SAP
HANA Live)
to develop reusable artifacts across application
stacks
The SAP<SID> schema is managed by the
AS ABAP
only create artifacts in SAP<SID> schema through
ABAP
use APIs to write to tables in SAP<SID> schema
and avoid using native SQL / SQLScript to write to
tables SAP<SID> schema
What are completely new
possibilities?
2013 SAP AG or an SAP affiliate company. All rights reserved. 28
Example 1: Application Function Libraries
Overview
Application Function Libraries
libraries of reusable functions linked dynamically to the
SAP HANA database kernel (implemented in C++)
can be used to perform data intensive and complex
calculations
BFL and AFL generally released as of SAP HANA SPS5
Business Function Library (BFL)
contains pre-built, parameter-driven business functions
(examples: annual depreciation, days outstanding)
Predictive Analysis Library (PAL)
contains statistical algorithms from areas like clustering,
classification, social network analysis
SAP HANA
Index Server
Business Function
Library (BFL)
Predictive Analysis
Library (PAL)

2013 SAP AG or an SAP affiliate company. All rights reserved. 29
Example 1: Application Function Libraries
Exemplary functions
function: Linear Average (BFL)
calculates a linear average, in which larger weights are applied to more recent
periods
weights decrease lineary as you look back over time
function: ABC Analysis (PAL)
classify objects (customers, employees, products) based on a particular measure
group objects by their estimated importance (A, B, C objects)
function: K-means (PAL)
partition records into k clusters in which each record belongs to the cluster with the
nearest center
e.g. used to group customers into segments
2013 SAP AG or an SAP affiliate company. All rights reserved. 30
Example: ABC analysis of products



Classification based on revenues attributed to the products
A products: 20% of the products accounts for 70% of the revenue
B products: 30% of the products accounts for 20% of the revenue
C products: 50% of the products accounts for 10% of the revenue






Example 1: Application Function Libraries
Demo scenario
Product ID Product Name Revenues Currency Classification
HT-1000 Notebook Basic 15 1.500.000 EUR A
HT-1001 Notebook Basic 16 800.000 EUR B
HT-2000 7 Widescreen DVD
player
1.700.000 EUR A
HT-2001 10 portable DVD player 500.000 EUR C
Demo
Application Function Libraries
2013 SAP AG or an SAP affiliate company. All rights reserved. 32
Example 2: Business rules
SAP NetWeaver Decision Service Management (DSM)
SAP NetWeaver Decision Service management helps to externalize
decision-making logic from ABAP-based application code








Decision Service
Repository
Decision Service
Versioning & Reporting
Decision Service
Modeling
Decision Service
Lifecycle Management
Model and change
decision services
Centrally store
decision services
Manage technical
aspects of decision
services
Gain full transparency
for analysis and legal
purposes
SAP NetWeaver Decision Service Management
IT
Business
domain
expert
SAP
ERP 1
SAP
ERP 2
SAP
CRM

Non-
SAP

Decision Service Distribution
Distribute decision
services for local
execution
2013 SAP AG or an SAP affiliate company. All rights reserved. 33
Example 2: Business rules
DSM and SAP HANA (1/2)
Dynamic Database View: deployment to SAP
HANA generates a result view based on database
(tables, views) and decision table content
database table or view as data source
decision table for calculated columns
result view to combine data source with calculated
columns
Decision table processed on SAP HANA database
by SELECT on result view
can be used directly in ABAP and in database lookup
expressions
Database table or view
Decision table
Result view
Column 1 Column 2
A 10
B 20
Condition
Column 1
Condition
Column 2
Result
Column 3
Result
Column 4
A 100 1.000
B 0.. 10 200 2.000
B > 10 300 3.000
Column 1 Column 2 Column 3 Column 4
A 10 100 1.000
B 20 300 3.000
2013 SAP AG or an SAP affiliate company. All rights reserved. 34
Example 2: Business rules
DSM and SAP HANA (2/2)
Usage of database procedures in DSM
functions on SAP HANA
either based on database procedure proxies
or based on ABAP-managed procedures
allows to push down expensive expressions to the
database

Analyze DSM expressions with SAP HANA
Example: decision table
Which row is mostly evaluated as true?
How do values develop over time?

Row 1 (100, 1.000)
Row 2 (200, 2.000)
Row 3 (300, 3.000)


Demo
Business rules
2013 SAP AG or an SAP affiliate company. All rights reserved. 36
Example 3: Text Search / Analysis
Overview
SAP HANA
Text Analysis
result database
table
F
u
l
l
t
e
x
t

i
n
d
e
x

Database
table
Text
Analysis
T
e
x
t

S
e
a
r
c
h

Text Search
search character-type columns of database tables in
column store
search operations: exact, fuzzy, linguistic
functions: ranking, snippets, facets
requires creation of so-called fulltext index
Text Analysis
structure, transform, enrich unstructured data for the
purpose of discovery or analysis
happens based on fulltext index (optional configuration
for a fulltext index)
results of text analysis are stored in a database table

2013 SAP AG or an SAP affiliate company. All rights reserved. 37
Example 3: Text Search / Analysis
Using text search capabilities in ABAP
Fulltext index in the SAP HANA database
is implicitly created only for column store data types
TEXT and SHORTTEXT
has to be explicitly created for other character-type
columns
Creation of fulltext index through ABAP
create (extension) index in transaction SE11
choose exactly one field for the index and specify
that the index is a fulltext index
available as of ABAP 7.4 SP2
Access by means of native SQL
SELECT pd.product_id, tx.text
FROM snwd_pd AS pd
INNER JOIN snwd_text_key AS tk
ON tk.node_key = pd.name_guid
INNER JOIN snwd_texts AS tx
ON tx.parent_key = tk.node_key
WHERE CONTAINS(tx.text, 'notbook',
FUZZY(0.7))
ORDER BY SCORE( );
Notebook Professional 15,
Notebook Basic 17,
Notebook Professional 17
2013 SAP AG or an SAP affiliate company. All rights reserved. 38
SAP HANA
SAP HANA Simple
Info Access (SInA)
AS ABAP
Value helps
Embedded
Search
User Interface / Browser
SInA JavaScript
API / UI Toolkit
tables, views, search models
Using text search capabilities in value helps
supports type-ahead, multi-column search and
specification of fuzziness
planned to be available as of ABAP 7.4 SP5
Embedded Search
use Embedded Search without the need to
extract and index data in TREX
planned to be available as of ABAP 7.4 SP5
SAP HANA Simple Info Access (SInA)
consists of HTTP service and client-side JavaScript
API / UI Toolkit
build simple, read-only search UIs


VISIT RDP261 Full-Text Search, Fuzzy
Search, and Text Analysis in SAP HANA
Example 3: Text Search / Analysis
Further possibilities in ABAP context
Demo
Text Search / Analysis
How can I get started with
ABAP on SAP HANA?
2013 SAP AG or an SAP affiliate company. All rights reserved. 41
How can I get started with ABAP on SAP HANA?
Overview / our offers
Book a training at SAP Education
for example: HA400 ABAP Programming for SAP HANA
Visit our web site to browse through documentation and get access to trial
systems (http://scn.sap.com/community/abap/hana)
ABAP for SAP HANA reference scenario
tutorials (e.g. how use database procedures) and best practices (e.g. performance
guidelines)
AS ABAP 7.4 trial as virtual appliance
Visit one of the many SAP TechEd lectures, hands-on workshops,
expert networking sessions
2013 SAP AG or an SAP affiliate company. All rights reserved. 42
How can I get started with ABAP on SAP HANA?
Trial systems
AS ABAP 7.4 trial as virtual appliance
application server and database are deployed at a cloud service provider
(currently supported Amazon EC2)
including integrated development environment in Eclipse
plus sample scenarios, tutorials and best practices
free of charge (except the charges of the cloud service provider)
Currently available systems
SAP NetWeaver Application Server ABAP 7.4 on SAP HANA
(AS ABAP 7.4 SP2, HANA Revision 1.00.56)
SAP NetWeaver Application Server ABAP 7.4 on SAP MaxDB
(AS ABAP 7.4 SP2, MaxDB 7.9.08)
An AS ABAP 7.4 trial on SAP MaxDB is planned to be available
for download in Q4/2013.
Cloud
Developer
VISIT ITM129 Simple and Fast
Deployments of SAP Solutions
Demo
AS ABAP 7.4 trial systems as virtual appliance
Summary
2013 SAP AG or an SAP affiliate company. All rights reserved. 45
Summary
ABAP is and will continue to be the basis for applications
like SAP Business Suite, SAP NetWeaver BW, new applications
on-premise as well as in virtual (private) cloud environments
AS ABAP 7.4 facilities leveraging SAP HANA features
by pushing down calculations to the database layer
by means of SAP HANA content integration as well as advanced ABAP database programming
SAP HANA offers many new possibilities for ABAP-based applications
Examples: application function libraries, business rules, text search
Get started with ABAP on SAP HANA today! Use our offers and trial systems!
2013 SAP AG or an SAP affiliate company. All rights reserved. 46
Further Information
SAP Education and Certification Opportunities
http://training.sap.com/v2/course/ha400-abap-programming-for-sap-hana-classroom-099-g-en/
Watch SAP TechEd Online
www.sapteched.com/online

SAP Public Web
saphana.com: http://saphana.com/community/learn/solutions/abap-for-hana
Developer Center: http://scn.sap.com/community/developer-center/abap
ABAP Development Tools for SAP NetWeaver: http://scn.sap.com/community/abap/eclipse
ABAP for HANA: http://scn.sap.com/community/abap/hana
ABAP 7.4 Trial Editions: http://scn.sap.com/docs/DOC-41566
2013 SAP AG or an SAP affiliate company. All rights reserved. 47
SAP TechEd Virtual Hands-on Workshops and SAP TechEd Online
Continue your SAP TechEd education after the event!
SAP TechEd Virtual Hands-on Workshops
Access hands-on workshops post-event
Available January March 2014
Complementary with your SAP TechEd registration

SAP TechEd Online
Access replays of keynotes, Demo Jam, SAP TechEd
LIVE interviews, select lecture sessions, and more!
View content only available online
http://saptechedhandson.sap.com/

http://sapteched.com/online
Feedback
Please complete your session evaluation for CD201.
Thanks for attending this SAP TechEd session.
2013 SAP AG or an SAP affiliate company. All rights reserved. 49
2013 SAP AG or an SAP affiliate company. 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.
National product specifications may vary.
These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and
SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth
in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.
SAP 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.
Please see http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.

Das könnte Ihnen auch gefallen