Transcript Short Presentation Title - SAP Public Services Forum
SAP HANA als Entwicklungsplattform
Matthias Kupczak SAP Forum - 12. Juni 2013
1 SAP HANA 2 SAP HANA Extended Services (XS) A Database for application logic?
Embedded application server 3 SAP NetWeaver Application Server on SAP HANA 4 SAP HANA development tools 5 Demo
In-Memory Computing
CPU
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
Memory
Column Store Partitioning Compression Insert Only on Delta Logging and Backup
Storage Disks
3
In-Memory Computing Implications
Delegation of data intense operations to the in-memory computing
Today‘s applications execute many
data
intense
operations
in the
application layer
Application Layer Data Layer High performance apps delegate
data intense operations
to the i
n-memory
computing layer
In-Memory Computing Imperative:
Avoid movement of detailed data Calculate first, then move results © 2013 SAP AG or an SAP affiliate company. All rights reserved.
4
SAP HANA Platform
SAP HANA is an open platform!
The Agony of Choice
https, ODBC, JDBC, oData , SQL, MDX, … Web Resource XS Engine Application Services oData Service
SAP HANA PLATFORM
Database Layer Integration Layer SAP delivered Customer Views Customer Queries Customer SQL Script Modeled / Scripted views Stored Procedures HANA Development Physical Tables Libraries, R-integration, Hadoop, data sources
logic as close as possible to the data
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
Data available instantaneously Pre-defined or own developed models within the database
5
Integrated development scenarios
Application Function Library (AFL)
/ Business function library (BFL) & Predictive Analytic Library (PAL)
UI integration
/ SAPUI5
External Libraries
/ e.g. Statistical language R
External Data integration
/ e.g. Hadoop cluster © 2013 SAP AG or an SAP affiliate company. All rights reserved.
6
SAP HANA embedded application server
SAP Extended Services (XS)
Client
• • •
Scope & features Lightweight
applications small
web-based leveraging
the built-in strengths of SAP
HANA capabilities minimize
“
layers
” • with an
http-based UI
(browser, mobile apps) • run directly on SAP HANA,
without
an
additional
external
application server HANA Data Presentation logic
Presentation artifacts
Control flow logic
Control flow artifacts
Calculation logic
Data artifacts © 2013 SAP AG or an SAP affiliate company. All rights reserved.
7
SAP ABAP Netweaver Application Server
SAP ABAP Application Architecture was built on several constraints
Data does not fit into server memory completely Disk I/O is a performance bottleneck The network is a performance bottleneck The DBMS is a bottleneck (as resource shared by all users) …
Some of these constraints changed
Data transfer between memory and CPU now an important performance bottleneck
CPU
Application Server Core CPU Cache Main Memory Disk © 2013 SAP AG or an SAP affiliate company. All rights reserved.
Still to be considered: Data transfer via network
Performance bottleneck today: CPU waiting for data to be loaded from memory into cache
Performance bottleneck in the past: Disk I/O 8
HANA Innovations Overview - SAP Applications
Different Landscape options HANA Content
(Reporting & Analytics)
HANA Accelerators Business Suite on HANA
Client Client SAP Business Suite (VDL) Any DB HANA DB SAP Business Suite Any DB HANA DB SAP Business Suite HANA DB • • • • •
Code Optimization
NetWeaver 7.3x first release ready for HANA • NetWeaver 7.40 massive HANA optimizations
Suite on HANA (NW 7.40)
Benefits of Hana optimization and full support of HANA capabilities DDIC integration of HANA artifacts Optimized tools, e.g. Trace tools, code inspector, etc.
Switch Framework after DB migration • Non disruptive, independent optimization without changing business logic © 2013 SAP AG or an SAP affiliate company. All rights reserved.
9
Different Optimization Categories NW ABAP Optimizations
AS ABAP Push down
• • • NEW tools for optimization with NW 7.40
• e.g. code inspections, Get SAP standard optimizations Extended UI experiences due to HANA capabilitites © 2013 SAP AG or an SAP affiliate company. All rights reserved.
• Optimize ABAP source code • •
examples
Replace „
SELECT * …
“ into „
SELECT
“ SQL push down instead of loop internal table
HANA Dev.
• • • • using HANA capabilities Implementation of complete new processes Integrate with external data and or programming libraries Extend the varity of client tools 10
NW 7.40 AS ABAP optimization tools
•
SQL Trace (ST05)
•
Runtime Analysis (SAT)
•
Code Inspector (SCI)
•
DBACOCKPIT (ST04)
•
Statistical records (STAD)
•
Memory Analysis (S_MEMORY_INSPECTOR)
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
11
Optimizing ABAP code using Open SQL
“Old” ABAP Code OPEN CURSOR SELECT * ld_cursor FOR only required columns!
FROM ( ls_tablenames tot_table ) CONNECTION ( i_dbcon_name ) rldnr = ld_ledger AND AND AND AND rrcty rvers rbukrs ryear IN IN IN IN i_range_rrcty i_range_rvers i_range_bukrs i_range_ryear AND racct IN i_range_racct AND Delegate aggregations to the AND AND AND IN i_range_drcrk rpmax IN i_range_rpmax ( it_where_clause ) ORDER BY ( it_orderlist ) .
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
“New” ABAP Code SELECT ( lt_fieldlist ) FROM zviewsdf2 CONNECTION ( i_dbcon_name ) WHERE rldnr = g_leading_rldnr AND rrcty AND bukrs EQ IN '0' gt_ranges_bukrs AND rbusa AND racct IN gt_ranges_gsber IN gt_ranges_racct AND ryear IN gt_ranges_ryear AND ( lt_where_clause ) GROUP BY ( lt_grouplist ) ORDER BY ( lt_orderlist ).
*connection (
DBCON
) refers to a secondary DB connection. Also known as side-car, side-by-side HANA setup 12
SAP HANA Platform
Development
NW AS, HTML5-based, SAP BusinessObjects BI, third party tools, any application Server https, ODBC, JDBC, oData , SQL, MDX, … Web Resource XS Engine Application Services oData Service
SAP HANA PLATFORM
Database Layer Integration Layer SAP delivered Customer Views Customer Queries Customer SQL Script Modeled / Scripted views Stored Procedures HANA Development Physical Tables Libraries, R-integration, Hadoop, data sources
logic as close as possible to the data Operational data available instantaneously
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
Pre-defined or own developed models within the database
13
SAP HANA Modeling / Development
Views SQL Script
Attribute Views (Dimensions, Time, Hierarchy, Derived) Analytic Views (Star schemas, facts, calculations) Calculation Views (Composite views, Modeled or Script) Transportable design time artifacts stored in the repository Runtime objects (Column store views) are generated from the modeled views Main procedural language of the SAP HANA database Push data intensive operations into the database Utilized in script-based Calculation views and procedures
Intregr. Libraries
SAP HANA Development Leverage the power of external libraries Open-Source, statistical functions through R Integration leveraging predefined functions © 2013 SAP AG or an SAP affiliate company. All rights reserved.
14
DEMO
Plunge into the real world …
1) Developing HANA Models 2) Consume HANA artifacts with SAP NW Application Server 3) Expose data directly into the web – HANA XS (HTML5 UI)
How to start? SAP Services & more …
•
HANA LAB
•
AMAZON
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
16
Zusammenfassung – 5 Punkte zum Mitnehmen
1.
2.
3.
4.
5.
SAP HANA is an
open & integrated development Platform (IDE) Application logic
is moving
into
the
database layer
HANA development platform provides
standard interfaces
New
SAP NW applications
significantly
benefit of HANA capabilities…
… BUT is further on
database independent
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
17
Thank you!
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
Matthias Kupczak
Consultant HANA CoE Switzerland
SAP Switzerland AG
Althardstrasse 80 8105 Regensdorf T +41 566 63 96 [email protected]
www.sap.com
Appendix
1) Consume HANA DB objects post NW 7.40
2) Consume HANA DB objects with NW 7.40
3) Translate open SQL to native SQL 4) SAP HANA (XS) technics
Open SQL: Access HANA Calculation View
• Create Calculation View with SAP HANA Studio • “c
onnection
“ in source code links to a predefined 2 nd DB connection © 2013 SAP AG or an SAP affiliate company. All rights reserved.
20
ADBC native SQL – ABAP DB connection
• • Read HANA artifacts via ADBC classes.
HANA specific SQL – no limitations © 2013 SAP AG or an SAP affiliate company. All rights reserved.
21
Improvements with NW 7.40
• • Data dictionary (DDIC) is extended to include HANA Views DDIC TYPE ‘external View’ • ABAP reports directly connect DDIC objects via open SQL • • Extended UI experience new ALV variant, fault-tolerant value helps, Analytical side-panels)
Further Optimizations
80% of ERP core Transactions / reports are in scope of optimizations (Most used / long running) Complete process optimizations New processes developed due to using HANA capabilities © 2013 SAP AG or an SAP affiliate company. All rights reserved.
22
Example: Translation of Open SQL to Native SQL
Application Server Table Buffer ABAP VM Application
Open SQL
Native SQL Database Interface (DBI) Database Specific Library (DBSL) DB Client DB Server For ABAP Native SQL Other DB Sever Native SQL
Open SQL statement Translated to native SQL (taken from SQL trace; ST05)
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
23
XS ENGINE
•
UI Rendering completely in the Client
•
Server-side procedural logic in JavaScript
• •
All artifacts stored in the SAP HANA Repository
UIS SAPUI5 XSJS HDBTable
SQLScript SQL Views
CDS XSODATA XSXMLA InA HDBRole
AFL
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
24
Code Optimization
Maximal Flexibility – Minimal Disruption
SAP HANA optimizations:
Additional views Stored procedures (code pushdown to SAP HANA)
To be activated via switch framework ‒ no change in business logic after migration to
SAP HANA
All switches are reversible Switches can be activated independently Maximal flexibility in consumption of optimizations Minimal disruption for customer business •
Custom Code (ABAP reports)
Regression tests for own code recommended after SAP HANA migration
Display Business Function (SFW2)
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
25