Presentation on Custom code management & tools held by Timo John at #sitHH 2015
Why is it worth to invest on custom code?
How can we manage our custom code with SAP tools?
What tools are provided?
6. Motivation
Custom code is the most expensive part of the software
27.06.2015 Custom Code Management Tools Seite 6
src1 : SAP AG page 7
7. Motivation
Low usage and quality of custom code drives costs
27.06.2015 Custom Code Management Tools Seite 7
src1 : SAP AG page 7
8. Motivation
Main benefits for reduced custom code objects
27.06.2015 Custom Code Management Tools Seite 8
• Less maintenance and adjustment efforts for custom code
• Less security-, destabilization-, data consistency risk
• Less testing effort
• Less complexity Reduce
src1 : SAP AG page 9
9. Getting started
How do I manage my custom code?
27.06.2015 Custom Code Management Tools Seite 9
STEP 1 Analyse custom code in system(s) based on actual usage:
Most usage in the system?
Usage, but not core business
Not used
STEP 2 Identify the pain points in - fix them
Security
Performance
Maintenance
should be decommissioned
If the budget allows it; clean up
UPL
CCAPPS / ATC
10. Getting started
Where can I start Custom Code Management?
27.06.2015 Custom Code Management Tools Seite 10
• Tools shipped with SAP Netweaver
• Custom Code Apps by SAP
• ABAP Test Cockpit / Code Inspector
• SQL Monitor & SQL Performance Tuning Worklist
• Coverage Analyser
• Custom Code Lifecycle Management by SAP Solution Manager
• 3rd party tools
11. Custom Code Apps
CCAPPS - Tools that help you
02.07.2015 Seite 11
• Set of powerful programs
• Take your time
Custom Code Management Tools
12. Usage & Procedure Logging
What code is executed in production systems?
02.07.2015 Seite 12
• Monitors executed functions
• Integrated in CCLM of
Solution Manager
• Different aggregations
• Long term evaluation possible
• Kernel function
- No measurable performance impact
neither CPU nor runtime1
1) src3 : SAP AG page 7
Custom Code Management Tools
13. Usage & Procedure Logging
Display UPL Data
02.07.2015 Seite 13
• Find code that is used most
• Identification of code that is not used with manual work -
• Find used EXITS and Enhancements
• Use UPL List for ATC object sets
• Currently no user segmentation like provided by SCOV
src3 : SAP AG page 7
Custom Code Management Tools
14. Custom Code Apps
CCAPPS - Tools that help you
02.07.2015 Seite 14
• Set of powerful programs
• Take your time
Custom Code Management Tools
15. SAP Clone Finder
Where do we have copy & paste coding?
27.06.2015 Custom Code Management Tools Seite 15
• Copy of SAP code with modifications
• Z-Code that is cloned in same / other packages
• Persistency of results
• Clones across systems
• Remote compare
17. SAP Clone Finder
Result
27.06.2015 Custom Code Management Tools Seite 17
• Copy of SAP code with modifications
• Z-Code Clones in same / other packages
18. Custom Code Apps
CCAPPS - Tools that help you
02.07.2015 Seite 18
• Set of powerful programs
• Take your time
Custom Code Management Tools
19. SAP Interface Analysis
Result
27.06.2015 Custom Code Management Tools Seite 19
• In which SAP Tables are my Z-Function Modules registered?
• Use of unreleased FMs
• List of Enhancements / Badis …
• Usage of obsolete Objects
• Reports that use SAP Object that have changed after Z-Object.
21. Custom Code Apps
CCAPPS - Tools that help you
02.07.2015 Seite 21
• Set of powerful programs
• Take your time
Custom Code Management Tools
22. SAP Code Metric Tool
What is the most complex code in one section?
27.06.2015 Custom Code Management Tools Seite 22
• Analyses the code for static metrics
• List all SAP modifications
• ( incl. Exit - coding )
• Limitations:
• No detection of complexity across modularisation units
23. SAP Code Metric Tool
Identification
27.06.2015 Custom Code Management Tools Seite 23
Lines of coe / number of statemts - what is the biggest codings?
Complexity ( conditions / decisions ) - where is the “spaghettiest” code?
Database interaction - who is reading / writing DB?
Autors / Version / Changes - which code was fixed most?
…
24. SAP Code Metric Tool
Identification
27.06.2015 Custom Code Management Tools Seite 24
Mehr Details über die Liste
25. SAP Code Metric Tool
Identification
27.06.2015 Custom Code Management Tools Seite 25
26. SAP Code Metric Tool
Alternative : Code Inspector Metrics
27.06.2015 Custom Code Management Tools Seite 26
Metrics: Max nesting, long coding block, comments, others
• Less Information available compared to Code Metric Tool
• Not so handy in use
• Can be used to create tends charts if executed regularly (Excel)
27. ABAP Test Cockpit
Use ATC to analyse trends based on statistic
27.06.2015 Custom Code Management Tools Seite 27
• Schedule ATC periodic runs to monitor trends in the coding
• Use stable check variant
• Combine Information with Code Inspector Metrics (Nos / Loc )
• ATC messages per number of statements; lower is better
28. ABAP Test Cockpit
Use ATC to analyse trends based on statistic
27.06.2015 Custom Code Management Tools Seite 28
09.06.2015 19.06.2015
2.597Prio1 / 116.359Nos = 2,23% 2.650Prio1 / 117.775Nos = 2,25%
29. ABAP Test Cockpit - Evaluation
bonprix Z-Tool to analyse ATC result trends
27.06.2015 Custom Code Management Tools Seite 29
• In which package are the most ATC findings / exemptions?
• Comparison between packages
• Trends
• Usage of Pragmas
30. SQL Performance Tuning Worklist
Where do we waste performance?
27.06.2015 Custom Code Management Tools Seite 30
1. Start SQL Monitor on productive system
2. Merge with Coverage Analyser data from test system
3. Merge with ATC findings from development system
4. Inspect results in development system SWLT
What Code is working on which tables hard
and has ATC Issues?
31. SQL Performance Tuning Worklist
Select screen
27.06.2015 Custom Code Management Tools Seite 31
Select data to include in evaluation
32. SQL Performance Tuning Worklist
Identification
27.06.2015 Custom Code Management Tools Seite 32
See the results of used data in one place
33. SQL Performance Tuning Worklist + UPL
Identification
27.06.2015 Custom Code Management Tools Seite 33
Found performance Issue within 10 minutes
34. SQL Performance Tuning Worklist
Second Example
27.06.2015 Custom Code Management Tools Seite 34
35. Closure
There tools that help you out!
27.06.2015 Custom Code Management Tools Seite 35
src1 : SAP AG page 4
Why do we do it?
• Less maintenance and adjustment efforts for custom code
• Less security-, destabilization-, data consistency risk
• Less testing effort
• Less complexity Reduce
PLEASE DO TESTING WITH BUSINESS!
37. Questions & Contact Information
27.06.2015 Custom Code Management Tools Seite 37
src1 : SAP AG page 9
@Timo_John
Custom Development ABAP
bonprix Handelsgesellschaft mbH
Haldesdorfer Straße 61
22179 Hamburg
http://scn.sap.com/people/timo.john
38. Resources
27.06.2015 Custom Code Management Tools Seite 38
scr1: Custom Code Management – Decommissioning[PDF] SAP 2014
scr2: Custom Code Management Custom Code Apps [PDF] SAP Active Global Support
scr3: CCM Usage & Procedure Logging[PDF] SAP Active Global Support
Usage & Procedure Logging [SCN] SCN 2015