Вы находитесь на странице: 1из 36

Changes to Custom Development

with the Advent of SAP HANA


Albrecht Gass & Chris Hanshew
smartShift Technologies
SESSION CODE: BT1811

LEARNING POINTS
SAP HANA is changing the way customers
manage their SAP Landscapes
SAP HANA requires your development team to
evolve their skills five practical examples
Performance Optimization Case Study

Agenda
Introductions Who We Are

How HANA Changes your SAP Landscape


Key HANA application development changes
Best Practices for ABAP for HANA
HANA Code Compliance & Optimization Case Study
Conclusion

smartShift Technologies
Global leader in automated enterprise system transformation
Company Overview

Capabilities

HQ in NYC and Germany | Global Presence


Automated transformation and moderization of

Manage SAP custom code with the ease of standard

systems since 2002


500m lines of code analyzed | 350m lines of code
remediated | 98% automation rate (past 2 yrs)
700+ Projects delivered to over 200 enterprise clients

Upgrades | Unicode Enablement | EHP deployment |

Accolades

Key Clients

Gartner Cool Vendor


CMMI Level 5, ISO 27001, ISO 9001
SAP Certified

code using automation for rapid upgrades & migrations

Performance Optimization | HANA migration

Automated code conversion and migration for dozens of


technologies (Assembler, COBOL, SAP/ABAP, C++, Java, beyond)

Automated Transformation
Time-to-value is measured in weeks, not months
Typical Duration of an Enterprise Transformation Project
Manual Approach

10

Analysis
smartShift Advantage

20

30

40

Time in Weeks
Code Changes
Integration Testing

50

60

UA Testing

More Rapidly

More Predictably

More Accurately

Uses automation to complete


migrations in days, not weeks.

Exact timelines quoted up front and


backed by a 100% service level
guarantee

Completed with full adherence to


known vendor and client
specifications

Speakers
Albrecht Gass

Christopher Hanshew

Chief Architect

Solution Architect

20+ years experience in high tech

17 years working with SAP technologies

Extensive knowledge in ALM

Leading product development at various


software companies

Worked as both systems integrator and SAP


Customer

3 years with smarShift Technologies and


ABAP transformation projects

Past ASUG volunteer (Development


Technologies SIG)

Multiple presentations at ASUG and d-Code


events

8 years with smarShift Technologies, tool


development and ABAP transformation
projects

Multiple presentations at ASUG and dCode events

HANA is not just a Database


Leveraging the SAP Business Suite on HANA to
increase weekly engine testing capacity
Utilizing HANA and data analytics to improve infant and
child mortality rates 6th highest rate in the country
Providing in depth player analytics to an estimated 40
million fantasy football players Over $800 million
spend on fantasy football per year

However the path may not be easy


Complex
Landscapes

New
Functionality
and Processes

Infrastructure

Custom
Applications

Unicode/EHPs/
Upgrades

Lets Break Some of those Complexities Down


Custom Applications
Unicode/EHPs/Upgrades/Performance Optimization

User Interface

Traditional Dynpros
BSP
Web Dynpros
Reports/Selection Screens

Application

ABAP

Database

Relational
10s of Thousands of tables
No Application Logic

Landscape Complexity

What does this mean for my landscape


Deployment Options

Landscape Simplification

Public Cloud

Global Instances

Private Cloud

Combined Applications

On Premise

Combined Business Units

Financial Services Example Landscape


Simplification
Current Landscape

Simplification Goals

Bus Unit 1

Bus Unit 5

General Ledger

General Ledger

Bus Unit 2

Consolidate and Optimize Processes

Reduce Reporting/GL Reconciliation


Time

General Ledger
Ledger Consolidation

Currently over 100 Ledgers

Bus Unit 3

General Ledger
Bus Unit 4

General Ledger

Bus Unit 6
General Ledger

Address existing performance


limitations

Finance Services Example (Landscape


Simplification)
Future Landscape

Current Landscape
Bus Unit 1

Bus Unit 5

Bus Unit 1, 2, 3, 4

General Ledger

General Ledger

General Ledger
SAP HANA (On Prem)

Bus Unit 2
General Ledger
Ledger Consolidation

Ledger Consolidation

Bus Unit 3
General Ledger
Bus Unit 4

General Ledger

Bus Unit 6
General Ledger

Bus Unit 5

Bus Unit 6

General Ledger

General Ledger

SAP HANA (On Prem)

SAP HANA (On Prem)

Financial Services one step further


Bus Unit 5
ERP

BW

General Ledger

Reporting

Business Suite

General Ledger/Reporting
SAP HANA (On Prem)

What does this mean for my Custom Applications?

Traditional Dynpros
BSP
Web Dynpros
Reports/Selection Screens

ABAP

Relational
10s of Thousands of tables
No Application Logic

User Interface

HTML5
Fiori Based Applications

Application

ABAP
SAP HANA XS (Native HANA)

Application Logic
Reduced Tables
Extensive Modeling

Database

HANA Optimization Best Practices


To realize the benefits of HANA, you first have get your code
compliant and optimize performance

HANA Code Compatibility (HCC)


HANA Performance Optimization (HPO)
HANA Code Pushdown

HCC - Implicit Ordering of Cluster/Pool Tables

What Changes

Pool / cluster tables are now


transparent tables

Resulting Issue

Results no longer returned in


primary key order

Risk Introduced

Change in application
behavior

How to Remediate

Ensure sorting of results

HCC - Implicit Ordering of Cluster/Pool Tables

HCC - Non-deterministic Ordering of Query Results

What Changes

Change in database system introduces


variability in the result order of transparent
tables

Resulting Issue

Access to transparent tables without explicit


ordering

Risk Introduced
How to Remediate

Change in application functionality

Enforce ordering of results based on prior


behavior

HCC Non-deterministic Ordering of Query Results

HCC Additional Considerations

Remove database Commit/Rollback

Replace native SQL


Remove query hints
Eliminate database-specific calls
e.g., check for existing indexes

Eliminate operating system-specific constructs


e.g., file paths and names

HPO - Reduce column list SELECT *

What Changes

Introduction of HANA column store

Resulting Issue

Non-optimal database access

Risk Introduced
How to Remediate

Reduced application performance

Based on usage, reduce selected column


list and optimize ABAP data structures

HPO - Conditions in SELECT statements

HPO - Conditions in SELECT statements

What Changes

Scalability of HANA as the


database layer

Resulting Issue

Change in best practices for


ABAP

Risk Introduced

Reduced application
performance

How to Remediate

Integrate all restrictions into


database query

HPO - Conditions in SELECT statements

HANA Code Pushdown


Maximizing HANA Performance potential requires Code Pushdown

Large ABAP code segments to be moved to DB


Create HANA views and procedures

Funnel use case:


A lot of data coming in, with only a small amount of information as the
output

Take advantage of HANA capabilities and strengths:


Parallelization
Fast, in-memory operations
Reduced data transfer

HANA Code Pushdown


Very resource-intensive if attempted manually

Highest level of difficulty


Why this is hard

Modularization in existing ABAP code


Call to standard functionality
Identify which code will benefit the most (SAP, 3rd parties)
Many options to achieve the same result
Fast changes of recommendations / best practices

Customer Case Study HANA Code


Compliance and Optimization
HANA POC to Prove:

Technical migration fits within maintenance windows


System Functionality remains in tact after EHP upgrade and HANA migration
Benchmark performance gains
Address custom code Optimization

smartShift Participation
Custom application analysis
Custom code automated transformation
Code quality and performance benchmarks

Code Compliance and Optimization


Process
Custom Application Optimization

Testing/Benchmarking

ERP 6.07
Non-HANA
Prod Copy

Non-HANA Benchmarks

3 Weeks

EHP Upgrade Testing

Migration Test

Code Transformation
Manual Adjustments

HANA Benchmarking

Performance Benchmarks

ERP 6.07
HANA
Prod Copy

Functionality Testing
Code Analysis
Code Quality Benchmark

Code Quality Benchmark

Key Findings
20,064 Technical Objects Analyzed (Programs,
Function Groups, Classes)
161 HANA Compliance Issues to be addressed

13,213 HANA Performance Optimization


Opportunities
Remediated in 3 weeks leveraging automation

Performance Optimization Select *


Before Transformation
SELECT * INTO CORRESPONDING FIELDS OF TABLE t_EDIDC_TAB
FROM EDIDC
WHERE DOCNUM IN S_IDOC
AND MESTYP IN S_MESTYP
AND STATUS EQ P_STATUS
AND SNDPOR IN S_SNDPOR
AND CREDAT IN S_CREDAT
AND UPDDAT IN S_UPDDAT.

After Transformation
SELECT DOCNUM INTO CORRESPONDING FIELDS OF TABLE t_EDIDC_TAB
FROM EDIDC
WHERE DOCNUM IN S_IDOC
AND MESTYP IN S_MESTYP
AND STATUS EQ P_STATUS
AND SNDPOR IN S_SNDPOR
AND CREDAT IN S_CREDAT
AND UPDDAT IN S_UPDDAT.

Sample size = 84K IDOC Records


ST12 Measurements
DB Before
DB After % Improvement
3,294,152 409,865
88%
2,242,840 315,320
86%
2,150,792 287,285
87%
5,107,513 605,156
88%
2,518,779 520,437
79%
3,062,815 427,613
86%

Performance Optimization Join


Before Transformation
START-OF-SELECTION.
* Fetching batch data from MCHA table
PERFORM get_batchdata.
* Fetching delivery data
PERFORM get_delivery_data.

FORM get_batchdata .
SELECT matnr "Material number
charg "Batch number
zustd "Batch status key
FROM mch1
INTO TABLE i_mch1
WHERE matnr IN s_matnr
AND charg IN s_charg
AND lvorm = space.
IF sy-subrc EQ 0.
SORT i_mch1 BY matnr charg.
ENDIF.
ENDFORM.
" get_batchdata

FORM get_delivery_data.

(Pseudo Code)
select data from likp.
sort it_likp.

select data from lips


for all entries in likp.
Loop at it_lips
read mch1 record
move data to second table
read likp record
move data to second table
endloop

Performance Optimization Join


After Transformation
SELECT i~vbeln i~posnr i~matnr i~werks i~charg
i~lichn i~lfimg i~aufnr
h~lfart
h~kunnr
h~lfuhr h~wadat_ist b~zustd
FROM lips as i inner join likp as h
on i~vbeln = h~vbeln
inner join mch1 as b
on i~matnr = b~matnr and i~charg = b~charg
INTO TABLE i_delivery
WHERE i~matnr in s_matnr
AND i~charg in s_charg
AND i~lichn IN s_lichn
AND i~aufnr IN s_aufnr
AND i~werks IN s_werks
AND h~lgnum in s_lgnum
AND h~lfart in s_lfart
AND h~vbtyp in it_vbtyp
AND h ~lvorm = space
order by i~vbeln i~posnr i~charg.

Tables LIPS, LIKP, MCH1 joined

Selection Criteria for all tables


included
No more loop processing on data

Performance Optimization Join


After Transformation Statistics

ABAP Before
104,955,625
98,829,974
102,350,688
109,950,469
114,543,209
106,125,993

ST12 Before
DB Before System Before
12,848,911
7,782
12,520,118
6,685
9,681,657
6,107
8,828,790
5,671
8,389,224
16,427
10,453,740
8,534

Total Before
117,812,318
111,356,777
112,038,452
118,784,930
122,948,860
116,588,267

ABAP After
51,529,680
61,510,856
81,777,884
50,028,251
54,235,579
59,816,450

ST12 After
DB After System After
7,310,021
4,677
7,394,618
21,453
6,029,112
10,371
9,810,178
4,812
6,591,110
4,736
7,427,008
9,210

Total after % Improvement


58,844,378
50%
68,926,927
38%
87,817,367
22%
59,843,241
50%
60,831,425
51%
67,252,668
42%

KEY TAKEAWAYS
Getting to HANA is unlocks business innovation but can be a
complex migration process
Customers should consider the potential for landscape simplifcation
Custom Code must be optimized to maximize the benefits of HANA
New development efforts need to consider HANA changes to avoid
performance degradation
Automated transformation can be used to accelerate your migration

Get to know smartShift Technologies


Learn More While Youre Here. Meet with Us.
PRESENTERS
Albrecht Gass

SALES
Mike DeLeonardis

(714) 809-6151
agass@smartshifttech.com

(617) 335-7160
mdeleonardis@smartshifttech.com

Chris Hanshew

PARTNERSHIPS
David Caravella

(317) 372-9034
chanshew@smartshifttech.com

(203) 564-3719
dcaravella@smartshifttech.com

THANK YOU FOR PARTICIPATING


Please provide feedback on this session by completing
a short survey via the event mobile application.
SESSION CODE: BT1811
For ongoing education on this area of focus,
visit www.ASUG.com