Beruflich Dokumente
Kultur Dokumente
TABLE OF CONTENTS
ABAP Test Cockpit .................................................................................................................................... 4
ATC Online Check ................................................................................................................................... 5
Handling Findings I: READ .. BINARY SEARCH .................................................................................... 10
Handling Findings II: DELETE ADJACENT DUPLICATES ..................................................................... 15
Handling Findings III: Empty FOR ALL ENTRIES Tables ....................................................................... 18
SQL Monitor SQLM ................................................................................................................................... 22
Slow Request........................................................................................................................................... 23
Many Executions ..................................................................................................................................... 28
Huge Data Transfer ................................................................................................................................. 31
Slow Statement........................................................................................................................................ 35
SQL Performance Tuning Worklist ............................................................................................................ 39
Selection Screen Configuation ................................................................................................................ 40
Analyzing Results I: Non-Local Nested SQL Statements........................................................................ 43
Analyzing Results II: SQL Statements Transfering Large Numbers of Records ..................................... 47
Do you have a lot of custom ABAP code which drives your central business processes? Do you want to
leverage SAP HANA and do you want to know what this means for your custom code? Do you have some
doubts if the SQL performance and general quality of your custom code is already outstanding? If yes, then
this is your session. You will see step by step how you get your custom code ready for SAP HANA and in
parallel how this brings the performance and quality of your custom code on a new level right now. This is a
hands-on session with many demos - you will experience new ABAP Test Cockpit Checks, a brand new SQL
monitor and much more. Get ready for SAP HANA!
Login Information
To logon to the system, use the following credentials.
Username: CD262_XX (replace XX with your group number)
Password: welcome
Objective
In this exercise you are supposed to execute the ABAP Test Cockpit (ATC) online check on an example
program and deal with the emerging findings.
What you will learn
Exercise description
Please perform the following steps:
Screenshot
Explanation
Screenshot
Explanation
Screenshot
Explanation
Screenshot
Explanation
Screenshot
10
Screenshot
Explanation
Screenshot
11
Explanation
12
Screenshot
Explanation
Screenshot
9. Click Activate
Ctrl+F3.
or press
to repeat
13
Explanation
14
Screenshot
Screenshot
15
Explanation
3. Double-click the last line to get to
the DELETE ADJACENT
DUPLICATES statement.
As in the previous exercise this
finding consists of two parts (the
SELECT and the DELETE
ADJACENT DUPLICATES) and so
you are first presented the call stack.
4. Click
or press Ctrl+F1 to
switch to editing mode.
6. Click Activate
.
You can also press Ctrl+F3.
7. Click Back
.
You can also press F3.
16
Screenshot
Explanation
Screenshot
to repeat
17
18
Screenshot
Explanation
Screenshot
19
Explanation
5. Click
or press Ctrl+F1 to
switch to editing mode.
20
Screenshot
Explanation
Screenshot
7. Click Activate
Ctrl+F3.
or press
8. Click Back
or press F3 to
navigate back to the result list.
to repeat
Summary
This exercise should have provided you with a basic understanding of how to use the ABAP Test Cockpit to
locate functional errors in ABAP source code.
21
Objective
In this exercise you are supposed to execute the Sql Monitor transaction SQLM to view and analyze the
current measurement for system M53.
What you will learn
Display of data with transaction SQLM
Usage of different combinations of sorting and filtering to find relevant source code
Analysis of the findings and proposal of improvements
Exercise description
22
Slow Request
Find the request with request entry point ZSQLM* with the largest total time.
Which statement of that request is responsible for the high time consumption?
How could the code be improved?
Many Executions
Which SQL-statement in package ZSQLM_TEST is executed most often?
For which entry points and in how many internal sessions is this statement executed?
How could the code be improved?
Huge Data Transfer
Find the two statements in package ZSQLM_TEST that fetch or modify at most database
records.
What could be improved?
Slow Statement
Find the SQLM trace entry in package ZSQLM_TEST with the largest value of Max.Time.
How can this large value be explained?
Slow Request
Explanation
Screenshot
23
Explanation
3. Select By Request .
24
Screenshot
Explanation
Screenshot
5. Click Execute
.
You can also press F8.
25
Explanation
6. Click Records
.
The results visible in the screen shot
may differ from the current results in
the system that you see during the
exercise. In the screen shot, the third
row in the result display has entry
point ZSQLM_TEST11. The "3" in
the column records is the number of
SQLM data records with this entry
point. Click on this number to view
these records.
26
Screenshot
Explanation
8. Click Back
previous page.
Screenshot
to return to the
27
Many Executions
Explanation
2. Select Executions .
You may also filter by package
ZSQLM_TEST.
3. Click Execute
.
You can also press F8.
28
Screenshot
Explanation
Screenshot
4. Double-click on Executions
.
As before, the current results you
see in the system may differ from the
screen shot. In the screen shot, the
third row contains the first result from
package ZSQLM_TEST (the
package name is not visible on the
screen, you could find it by scrolling
to the right).
5. Click Back
previous page.
to return to the
(compare report
ZSQLM_TEST3_OPT).
6. Click Records
.
Click on the link "3" to see the SQLM
records with this source position.
29
Explanation
7. Click Exe./Sess.
.
The loop with the SELECT SINGLE
statement is executed with three
different request entry points:
Reports ZSQLM_TEST,
ZSQLM_TEST3 and the remote
function call of
ZSQLM_CALLBACK_RFC.
The column "Int. Sess." shows, how
often each entry point was executed
whereas the column "Exe./Sess."
shows how often the statement was
executed on average for each entry
point.
30
Screenshot
1. Click Execute
Screenshot
2. Click Records
31
Explanation
32
Screenshot
Explanation
6. Click Back
previous page.
Screenshot
to return to the
33
Explanation
9. Click Back
previous page.
Screenshot
to return to the
34
Slow Statement
Explanation
Screenshot
1. Select None.
Start this exercise by going back to
the Data Display selection screen of
SQLM.
35
Explanation
Screenshot
3. Click Execute
.
You can also press F8.
6. Double-click on
.
The topmost statement occasionally
needs more than 20 seconds to fetch
a single record ...
36
Explanation
7. Click Back
previous page.
Screenshot
to return to the
37
Explanation
Screenshot
12. Double-click
on
.
Summary
In this exercise, you have learned how to use the SQL monitor to find ABAP coding with a high resource
footprint. You have recognized some common mistakes in this coding and you have seen how to improve it.
38
Objective
In this exercise you are supposed to use the SQL Performance Tuning Worklist to find and analyze
performance-critical SQL statements.
What you will learn
How to setup the selection screen of the SQL Performance Tuning Worklist
How to analyze results based on runtime and static data
Exercise description
Please perform the following steps:
39
40
Screenshot
Explanation
Screenshot
9. Click Execute
load the results.
or press Enter.
or press F8 to
41
Explanation
42
Screenshot
Screenshot
or press Enter.
43
Explanation
44
Screenshot
Explanation
Screenshot
or pressing F3.
45
Explanation
46
Screenshot
Screenshot
to sort it in descending
47
Explanation
48
Screenshot
Explanation
Screenshot
Summary
With this exercise you should have obtained a basic idea of how to use the SQL Performance Tuning
Worklist to find and analyze performance pitfalls in your system.
49
50