ABAP to Hana3 - Ok

36
Changes to Custom Development with the Advent of SAP HANA Albrecht Gass & Chris Hanshew smartShift Technologies SESSION CODE: BT1811

Transcript of ABAP to Hana3 - Ok

Page 1: ABAP to Hana3 - Ok

Changes to Custom Development with the Advent of SAP HANAAlbrecht Gass & Chris HanshewsmartShift Technologies

SESSION CODE: BT1811

Page 2: ABAP to Hana3 - Ok

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

LEARNING POINTS

Page 3: ABAP to Hana3 - Ok

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

Agenda

Page 4: ABAP to Hana3 - Ok

smartShift Technologies

• Gartner Cool Vendor

• CMMI Level 5, ISO 27001, ISO 9001

• SAP Certified

• HQ in NYC and Germany | Global Presence

• Automated transformation and moderization of systems since 2002

• 500m lines of code analyzed | 350m lines of coderemediated | 98% automation rate (past 2 yrs)

• 700+ Projects delivered to over 200 enterprise clients

Company Overview

• Manage SAP custom code with the ease of standard code using automation for rapid upgrades & migrations

• Upgrades | Unicode Enablement | EHP deployment | Performance Optimization | HANA migration

• Automated code conversion and migration for dozens of technologies (Assembler, COBOL, SAP/ABAP, C++, Java, beyond)

Global leader in automated enterprise system transformation

Accolades Key Clients

Capabilities

Page 5: ABAP to Hana3 - Ok

Automated Transformation

0 10 20 30 40 50 60

Time in Weeks

Analysis Code Changes Integration Testing UA Testing

Time-to-value is measured in weeks, not months

Typical Duration of an Enterprise Transformation Project

Manual Approach

smartShift Advantage More Rapidly

Uses automation to complete

migrations in days, not weeks.

More Predictably

Exact timelines quoted up front and

backed by a 100% service level

guarantee

More Accurately

Completed with full adherence to

known vendor and client

specifications

Page 6: ABAP to Hana3 - Ok

Albrecht Gass

Chief Architect

20+ years experience in high tech

Extensive knowledge in ALM

Leading product development at various

software companies

8 years with smarShift Technologies, tool

development and ABAP transformation

projects

Multiple presentations at ASUG and d-

Code events

Christopher Hanshew

Solution Architect

17 years working with SAP technologies

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

Speakers

Page 7: ABAP to Hana3 - Ok

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

Page 8: ABAP to Hana3 - Ok

However the path may not be easy

Complex

Landscapes

New Functionalityand Processes

InfrastructureCustom

Applications

Unicode/EHPs/

Upgrades

Page 9: ABAP to Hana3 - Ok

Let’s Break Some of those Complexities Down

Database

Application

User Interface

• Traditional Dynpros

• BSP

• Web Dynpros

• Reports/Selection Screens

• ABAP

• Relational

• 10s of Thousands of tables

• No Application Logic

Custom Applications

Unicode/EHPs/Upgrades/Performance Optimization Landscape Complexity

Page 10: ABAP to Hana3 - Ok

What does this mean for my landscape

Private Cloud

Public Cloud

On Premise

Deployment Options Landscape Simplification

Global Instances

Combined Applications

Combined Business Units

Page 11: ABAP to Hana3 - Ok

Financial Services Example – Landscape

Simplification

General Ledger

Bus Unit 1

General Ledger

Bus Unit 2

General Ledger

Bus Unit 3

General Ledger

Bus Unit 4

Ledger Consolidation

General Ledger

Bus Unit 5

General Ledger

Bus Unit 6

Consolidate and Optimize Processes

Reduce Reporting/GL Reconciliation

Time

Currently over 100 Ledgers

Address existing performance

limitations

Current Landscape Simplification Goals

Page 12: ABAP to Hana3 - Ok

Finance Services Example (Landscape

Simplification)

General Ledger

Bus Unit 1

General Ledger

Bus Unit 2

General Ledger

Bus Unit 3

General Ledger

Bus Unit 4

Ledger Consolidation

General Ledger

Bus Unit 1, 2, 3, 4

SAP HANA (On Prem)

Ledger Consolidation

General Ledger

Bus Unit 5

General Ledger

Bus Unit 6General Ledger

Bus Unit 5

General Ledger

Bus Unit 6

SAP HANA (On Prem) SAP HANA (On Prem)

Current Landscape Future Landscape

Page 13: ABAP to Hana3 - Ok

Financial Services – one step further

General Ledger

Bus Unit 5

ERP

Reporting

BW

General Ledger/Reporting

Business Suite

SAP HANA (On Prem)

Page 14: ABAP to Hana3 - Ok

What does this mean for my Custom Applications?

Database

Application

User Interface

• Traditional Dynpros

• BSP

• Web Dynpros

• Reports/Selection Screens

• ABAP

• Relational

• 10s of Thousands of tables

• No Application Logic

• HTML5

• Fiori Based Applications

• ABAP

• SAP HANA XS (Native HANA)

• Application Logic

• Reduced Tables

• Extensive Modeling

Page 15: ABAP to Hana3 - Ok

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

HANA Optimization Best Practices

Page 16: ABAP to Hana3 - Ok

HCC - Implicit Ordering of Cluster/Pool Tables

What Changes

Resulting Issue

Risk Introduced

How to Remediate

• Pool / cluster tables are now transparent tables

• Results no longer returned in primary key order

• Change in application behavior

• Ensure sorting of results

Page 17: ABAP to Hana3 - Ok

HCC - Implicit Ordering of Cluster/Pool Tables

Page 18: ABAP to Hana3 - Ok

HCC - Non-deterministic Ordering of Query Results

What Changes

Resulting Issue

Risk Introduced

How to Remediate

•Change in database system introduces variability in the result order of transparent tables

•Access to transparent tables without explicit ordering

•Change in application functionality

•Enforce ordering of results based on prior behavior

Page 19: ABAP to Hana3 - Ok

HCC – Non-deterministic Ordering of Query Results

Page 20: ABAP to Hana3 - Ok

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

HCC – Additional Considerations

Page 21: ABAP to Hana3 - Ok

HPO - Reduce column list SELECT *

What Changes

Resulting Issue

Risk Introduced

How to Remediate

• Introduction of HANA column store

•Non-optimal database access

•Reduced application performance

•Based on usage, reduce selected column list and optimize ABAP data structures

Page 22: ABAP to Hana3 - Ok

HPO - Conditions in SELECT statements

Page 23: ABAP to Hana3 - Ok

HPO - Conditions in SELECT statements

What Changes

Resulting Issue

Risk Introduced

How to Remediate

• Scalability of HANA as the database layer

• Change in best practices for ABAP

• Reduced application performance

• Integrate all restrictions into database query

Page 24: ABAP to Hana3 - Ok

HPO - Conditions in SELECT statements

Page 25: ABAP to Hana3 - Ok

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

Page 26: ABAP to Hana3 - Ok

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

HANA Code Pushdown

Page 27: ABAP to Hana3 - Ok

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

Customer Case Study – HANA Code

Compliance and Optimization

Page 28: ABAP to Hana3 - Ok

Code Compliance and Optimization

Process

Non-HANA Benchmarks

Migration Test

• ERP 6.07

• Non-HANA

• Prod Copy

• ERP 6.07

• HANA

• Prod Copy

Testing/Benchmarking

EHP Upgrade Testing

HANA Benchmarking

Functionality Testing

Code Analysis

Code Quality Benchmark

Custom Application Optimization

Code Transformation

Manual Adjustments

Performance Benchmarks

Code Quality Benchmark

3 W

eeks

Page 29: ABAP to Hana3 - Ok

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

Key Findings

Page 30: ABAP to Hana3 - Ok

Performance Optimization – Select *

SELECT * INTO CORRESPONDING FIELDS OF TABLE t_EDIDC_TABFROM EDIDC

WHERE DOCNUM IN S_IDOCAND MESTYP IN S_MESTYPAND STATUS EQ P_STATUSAND SNDPOR IN S_SNDPOR AND CREDAT IN S_CREDAT AND UPDDAT IN S_UPDDAT.

SELECT DOCNUM INTO CORRESPONDING FIELDS OF TABLE t_EDIDC_TABFROM EDIDC

WHERE DOCNUM IN S_IDOCAND MESTYP IN S_MESTYPAND STATUS EQ P_STATUSAND SNDPOR IN S_SNDPOR AND CREDAT IN S_CREDAT AND UPDDAT IN S_UPDDAT.

Before Transformation

After Transformation

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%

Sample size = 84K IDOC Records

Page 31: ABAP to Hana3 - Ok

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 numberzustd "Batch status keyFROM mch1INTO TABLE i_mch1WHERE matnr IN s_matnrAND charg IN s_chargAND 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 lipsfor all entries in likp.

Loop at it_lipsread mch1 recordmove data to second tableread likp recordmove data to second table

endloop

Page 32: ABAP to Hana3 - Ok

Performance Optimization Join

After Transformation

SELECT i~vbeln i~posnr i~matnr i~werks i~chargi~lichn i~lfimg i~aufnr h~lfart h~kunnrh~lfuhr h~wadat_ist b~zustd

FROM lips as i inner join likp as h on i~vbeln = h~vbelninner join mch1 as b on i~matnr = b~matnr and i~charg = b~charg

INTO TABLE i_deliveryWHERE i~matnr in s_matnr

AND i~charg in s_chargAND i~lichn IN s_lichnAND i~aufnr IN s_aufnrAND i~werks IN s_werksAND h~lgnum in s_lgnum

AND h~lfart in s_lfartAND h~vbtyp in it_vbtypAND 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

Page 33: ABAP to Hana3 - Ok

Performance Optimization Join

After Transformation Statistics

ST12 Before ST12 After

ABAP Before DB Before System Before Total Before ABAP After DB After System After Total after % Improvement

104,955,625 12,848,911 7,782 117,812,318 51,529,680 7,310,021 4,677 58,844,378 50%

98,829,974 12,520,118 6,685 111,356,777 61,510,856 7,394,618 21,453 68,926,927 38%

102,350,688 9,681,657 6,107 112,038,452 81,777,884 6,029,112 10,371 87,817,367 22%

109,950,469 8,828,790 5,671 118,784,930 50,028,251 9,810,178 4,812 59,843,241 50%

114,543,209 8,389,224 16,427 122,948,860 54,235,579 6,591,110 4,736 60,831,425 51%

106,125,993 10,453,740 8,534 116,588,267 59,816,450 7,427,008 9,210 67,252,668 42%

Page 34: ABAP to Hana3 - Ok

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

KEY TAKEAWAYS

Page 35: ABAP to Hana3 - Ok

PRESENTERS

Albrecht Gass

(714) 809-6151

[email protected]

Chris Hanshew

(317) 372-9034

[email protected]

SALES

Mike DeLeonardis(617) 335-7160

[email protected]

PARTNERSHIPS

David Caravella(203) 564-3719

[email protected]

Get to know smartShift Technologies

Learn More While You’re Here. Meet with Us.

Page 36: ABAP to Hana3 - Ok

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