© 2015 SAP SE or an SAP affiliate company. All rights reserved. 1
Custom Code Analyse für HANA Projekte
R/2
1979
R/3
1992
ERP
2004 2015
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 2Customer
Agenda
Notwendige Funktionale Custom Code
Anpassung
Anpassung Custom Code wegen
Simplifizierung
Optionale Performance Optimierung
Custom Code Analyse NW750
ATC, UPL
SQL Monitor und SWLT
HANA DB
S4HANA
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 3Customer
Custom Code Analysis and Adjustments
Total Footprint Used Objects ImpactedObjects
Critical Objects
1
2
3
4
There is no need to adapt all objects, focus on the most critical based on usage and impact.
1. Capture the Custom Code Footprint
• Custom Code Maintainability Check
• Custom Development Management Cockpit (CDMC) or
• Custom Code Lifecycle Management (CCLM)
2. Reduce the scope
• Usage Procedure Logging (UPL)
• ABAP SQL Monitoring (SQLM)
3. Identify the impacted objects
• CDMC
• Code Inspector
• ABAP Test Cockpit (ATC)
4. Focus on those objects that are
critical for the business
• SAP Performance Tuning Worklist (SWLT)
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 4Customer
What is the impact of SAP HANA on your custom code?
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 5Customer
Agenda
Notwendige Funktionale Custom Code
Anpassung
Anpassung Custom Code wegen
Simplifizierung
Optionale Performance Optimierung
Custom Code Analyse NW750
ATC, UPL
SQL Monitor und SWLT
HANA DB
S4HANA
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 6Customer
Adjust HANA Specific
Can any custom ABAP code cause potential functional issues requiring it to be changed?
In general existing ABAP code runs on SAP HANA as before.
Only if ABAP code relies on technical specifics of the old database or directly accesses pool / cluster
tables then ABAP code changes would be necessary.
Reason Coding to be corrected
DB Migration Native SQL, Hints, using DB specific features
SAP HANA Architecture /
Depooling & Declustering
- Direct access of technical index information or cluster/pool tables
- Relying on the “default” sorting of DB content which is not guaranteed
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 7Customer
Custom code - Database and Functional related issues
How to address missing ORDER BY issue
Location of non-robust ABAP code that relies on a non-guaranteed/implicit sorting of certain SQL
queries, even though no ORDER BY clause is used. For these incorrect ABAP source code sections, an
explicit sorting of the SQL query must be inserted (ORDER BY clause or ABAP SORT).
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 8Customer
Custom code - Database and Functional related issues
How to address Critical statements where Native SQL or DB Hints are used
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 9Customer
ABAP Test Cockpit and Performance Tuning Worklist
ABAP Test Cockpit – Overview
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 10Customer
Agenda
Notwendige Funktionale Custom Code
Anpassung
Anpassung Custom Code wegen
Simplifizierung
Optionale Performance Optimierung
Custom Code Analyse NW750
ATC, UPL
SQL Monitor und SWLT
HANA DB
S4HANA
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 11Customer
What is the impact on your custom code of SAP HANA?
Is any custom ABAP code likely to cause performance issues with SAP HANA?
Existing “golden rules” for Open SQL remain valid as general recommendations. There are some shifts
of priorities (e.g. index definition (lower) and avoidance of nested selects (higher))
Keep the result sets small Rule still valid
Minimize amount of transferred data Rule still valid
Minimize the number of data transfers Rule still valid and even more important for SAP HANA
Prefer array operations for INSERT, UPDATE and
DELETE when changing many records
Avoid nested SELECT loops
Keep load away from the database
(not part of this service) Keep unnecessary load away from the database
Code pushdown for data-intensive calculations to
benefit from SAP HANA
Minimize the search overhead Rule still valid
In most cases SAP HANA does not require
secondary indices
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 12Customer
What is the impact on your custom code of SAP HANA?
Which of the main businesses processes have the potential for HANA to speed up massively?
(not part of this service but future potential)
Which transaction should not only be technically
migrated but re-designed to use the full speed of
SAP HANA?
Code pushdown to SAP HANA enables the full
potential of HANA to leverage the most important
business processes / transactions
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 13Customer
The new “Code to Data”Paradigm powered by SAP HANA
AS ABAP
SAP HANA Database
Calculations
Calculations
“Data to Code” “Code to Data”
Code pushdown means delegating data-intensive processing to the database layer
(aka Code pushdown)
Classic approach New approach
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 14Customer
SAP HANA Code Pushdown ExampleABAP Managed Code Pushdown – Extensively utilized in SAP S/4 HANA
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 15Customer
The New ABAP SQL Monitor
Architecture
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 16Customer
The New ABAP SQL Monitor
Analyzing Data
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 17Customer
The New ABAP SQL Monitor
Analyzing Data
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 18Customer
ABAP Test Cockpit and Performance Tuning Worklist
ABAP Test Cockpit – Overview
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 19Customer
ABAP Test Cockpit and Performance Tuning Worklist
SQL Performance Tuning Worklist – Motivation
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 20Customer
ABAP Test Cockpit and Performance Tuning Worklist
SQL Performance Tuning Worklist – Usage
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 21Customer
ABAP Test Cockpit and Performance Tuning Worklist
SQL Performance Tuning Worklist – Usage
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 22Customer
Custom code assessment results – Performance SQLM
Optimisation – SQL which is executed very often
Example:
SQL Performance Tuning Worklist linked results from SQLM with static checks combining
runtime information with performance issue detected by SAP Code Inspector.
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 23Customer
Agenda
Notwendige Funktionale Custom Code
Anpassung
Anpassung Custom Code wegen
Simplifizierung
Optionale Performance Optimierung
Custom Code Analyse NW750
ATC, UPL
SQL Monitor und SWLT
HANA DB
S4HANA
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 24Customer
What is the impact of S4HANA on your custom code?
© 2014 SAP AG or an SAP affiliate company. All rights reserved. 25Customer
Adjust S4HANA Specific
Fragestellung:
• Verwendung von SAP-Objekten in Ihren Eigenentwicklungen
• Ergänzungen (wie Erweiterungen, Datenbanktabellen-Appends usw.) für SAP-Objekte
• Modifikationen an SAP-Objekten
Durchführung:
• Inhalte der Vereinfachungsdatenbank (Simplification DB) aus SAP Service Marketplace
herunterladen
• Vereinfachungsdatenbank als ZIP-Datei importieren
• Eigenentwicklungen analysieren und ZIP-Dateien herunterladen
• Metadaten zu Eigenentwicklungen hochladen
• Vereinfachungen mit Bezug auf Eigenentwicklungen analysieren
© 2014 SAP AG or an SAP affiliate company. All rights reserved.
Many Thanks
Georg LodererBusiness Process Principal Consultant
M +43-664-620 75 01
http://www.sap.at