This book is your guide for analyzing and optimizing ABAP source code. You’ll learn about the analysis tools and performance-relevant technologies, and discover how you can analyze existing source code and enhance your programming style. This is the resource you need to ensure that your ABAP programs are fully optimized.
1 Analysis Tools
After reading this book, you’ll know when and how to use analysis tools properly — including Code Inspector, performance trace, ABAP trace, or single records statistics.
2 Programming Technologies
Get detailed information on parallel processing, internal tables, SQL data processing, and much more, and learn how these technologies affect performance.
3 Buffering
Explore the different buffers that are available on the SAP NetWeaver Application Server ABAP, and learn the most important buffer options to avoid unnecessary database accesses.
4 Database Tuning
You’ll obtain a description of the database architecture and the technical background of database accesses, and master the tuning options for database accesses.
5 New Developments
Learn from a comprehensive overview of the new developments in ABAP Release 7.0, EhP2, such as Transaction SAT, the innovations of the performance trace, and changes of internal tables.
Hermann Gahm is a Support Consultant in the Technology & Performance area of SAP Active Global Support. His work focuses on the support of major SAP customers within the scope of optimization services related to ABAP performance problems.
1 ... Introduction ... 17
... 1.1 ... Tuning Methods ... 17
... 1.2 ... Structure of the Book ... 19
... 1.3 ... How to Use This Book ... 20
2 ... SAP System Architecture for ABAP Developers ... 21
... 2.1 ... SAP System Architecture ... 21
... ... 2.1.1 ... Three-Layer Architecture ... 22
... ... 2.1.2 ... Distribution of the Three Layers ... 23
... 2.2 ... Performance Aspects of the Architecture ... 25
... ... 2.2.1 ... Frontend ... 26
... ... 2.2.2 ... Application Layer ... 26
... ... 2.2.3 ... Database ... 27
... ... 2.2.4 ... Summary ... 27
3 ... Performance Analysis Tools ... 29
... 3.1 ... Overview of Tools ... 29
... 3.2 ... Usage Time of Tools ... 31
... 3.3 ... Analysis and Tools in Detail ... 34
... ... 3.3.1 ... SAP Code Inspector (Transaction SCI ... 34
... ... 3.3.2 ... Selectivity Analysis (Transaction DB05 ... 40
... ... 3.3.3 ... Process Analysis (Transactions SM50/SM66) — Status of a Program ... 44
... ... 3.3.4 ... Debugger — Memory Analysis ... 47
... ... 3.3.5 ... Memory Inspector (Transaction S_MEMORY_INSPECTOR ... 49
... ... 3.3.6 ... Transaction ST10 — Table Call Statistics ... 51
... ... 3.3.7 ... Performance Trace — General Information (Transaction ST05 ... 54
... ... 3.3.8 ... Performance Trace — SQL Trace (Transaction ST05 ... 57
... ... 3.3.9 ... Performance Trace — RFC Trace (Transaction ST05 ... 70
... ... 3.3.10 ... Performance Trace — Enqueue Trace (Transaction ST05 ... 72
... ... 3.3.11 ... Performance Trace — Table Buffer Trace (Transaction ST05 ... 74
... ... 3.3.12 ... ABAP Trace (Transaction SE30 ... 77
... ... 3.3.13 ... Single Transaction Analysis (Transaction ST12 ... 89
... ... 3.3.14 ... E2E Trace ... 101
... ... 3.3.15 ... Single Record Statistics (Transaction STAD ... 109
... ... 3.3.16 ... Dump Analysis (Transaction ST22 ... 119
... 3.4 ... Tips for the Performance Analysis ... 123
... ... 3.4.1 ... Consistency Checks ... 123
... ... 3.4.2 ... Time-Based Analysis ... 123
... ... 3.4.3 ... Prevention ... 123
... ... 3.4.4 ... Optimization ... 124
... ... 3.4.5 ... Runtime Behavior of Mass Data ... 124
... 3.5 ... Summary ... 124
4 ... Parallel Processing ... 127
... 4.1 ... Packaging ... 127
... 4.2 ... Parallel Processing ... 129
... ... 4.2.1 ... Background ... 130
... ... 4.2.2 ... Challenges and Solution Approaches for Parallelized Programs ... 131
... ... 4.2.3 ... Parallel Processing Technologies ... 140
... ... 4.2.4 ... Summary ... 145
5 ... Data Processing with SQL ... 147
... 5.1 ... The Architecture of a Database ... 147
... 5.2 ... Execution of SQL ... 151
... ... 5.2.1 ... Execution in SAP NetWeaver AS ABAP ... 151
... ... 5.2.2 ... Execution in the Database ... 153
... 5.3 ... Efficient SQL: Basic Principles ... 155
... 5.4 ... Access Strategies ... 155
... ... 5.4.1 ... Logical Structures ... 155
... ... 5.4.2 ... Indexes as Search Helps ... 158
... ... 5.4.3 ... Operators ... 167
... ... 5.4.4 ... Decision for an Access Path ... 169
... ... 5.4.5 ... Analysis and Optimization in ABAP ... 170
... ... 5.4.6 ... Summary ... 184
... 5.5 ... Resulting Set ... 185
... ... 5.5.1 ... Reducing the Columns ... 188
... ... 5.5.2 ... Reducing the Rows ... 190
... ... 5.5.3 ... Reading a Defined Number of Rows ... 191
... ... 5.5.4 ... Aggregating ... 193
... ... 5.5.5 ... Existence Checks ... 195
... ... 5.5.6 ... Updates ... 196
... ... 5.5.7 ... Summary ... 197
... 5.6 ... Index Design ... 198
... ... 5.6.1 ... Read or Write Processing ... 200
... ... 5.6.2 ... How is Data Accessed ... 202
... ... 5.6.3 ... Summary ... 204
... 5.7 ... Execution Frequency ... 205
... ... 5.7.1 ... View ... 209
... ... 5.7.2 ... Join ... 210
... ... 5.7.3 ... FOR ALL ENTRIES ... 211
... 5.8 ... Used API ... 215
... ... 5.8.1 ... Static Open SQL ... 216
... ... 5.8.2 ... Dynamic Open SQL ... 216
... ... 5.8.3 ... Static Native SQL ... 216
... ... 5.8.4 ... Summary ... 217
... 5.9 ... Special Cases and Exceptions ... 217
... ... 5.9.1 ... Sorting ... 217
... ... 5.9.2 ... Pool and Cluster Tables ... 218
... ... 5.9.3 ... Hints and Adapting Statistics ... 220
6 ... Buffering of Data ... 223
... 6.1 ... SAP Memory Architecture from the Developer’s Point of View ... 223
... ... 6.1.1 ... User-Specific Memory ... 225
... ... 6.1.2 ... Cross-User Memory ... 225
... 6.2 ... User-Specific Buffering Types ... 227
... ... 6.2.1 ... Buffering in the Internal Session ... 227
... ... 6.2.2 ... Buffering Across Internal Sessions ... 230
... ... 6.2.3 ... Buffering Across External Sessions ... 231
... ... 6.2.4 ... Summary ... 231
... 6.3 ... Cross-User Buffering Types ... 232
... ... 6.3.1 ... Buffering in the Shared Buffer ... 232
... ... 6.3.2 ... Buffering in the Shared Memory ... 233
... ... 6.3.3 ... Buffering via the Shared Objects ... 234
... ... 6.3.4 ... Summary ... 235
... 6.4 ... SAP Table Buffering ... 236
... ... 6.4.1 ... Architecture and Overview ... 237
... ... 6.4.2 ... What Tables Can Be Buffered ... 243
... ... 6.4.3 ... Performance Aspects of Table Buffering ... 244
... ... 6.4.4 ... Analysis Options ... 251
... 6.5 ... Summary ... 251
7 ... Processing of Internal Tables ... 253
... 7.1 ... Overview of Internal Tables ... 253
... 7.2 ... Organization in the Main Memory ... 255
... 7.3 ... Table Types ... 258
... 7.4 ... Performance Aspects ... 265
... ... 7.4.1 ... Fill ... 265
... ... 7.4.2 ... Read ... 268
... ... 7.4.3 ... Modify ... 273
... ... 7.4.4 ... Delete ... 274
... ... 7.4.5 ... Condense ... 275
... ... 7.4.6 ... Sort ... 276
... ... 7.4.7 ... Copy Cost-Reduced or Copy Cost-Free Access ... 277
... ... 7.4.8 ... Secondary Indexes ... 278
... ... 7.4.9 ... Copy ... 279
... ... 7.4.10 ... Nested Loops and Nonlinear Runtime Behavior ... 282
... ... 7.4.11 ... Summary ... 284
8 ... Communication with Other Systems ... 287
... 8.1 ... RFC Communication Between ABAP Systems ... 288
... ... 8.1.1 ... Synchronous RFC ... 288
... ... 8.1.2 ... Asynchronous RFC ... 288
... 8.2 ... Performance Aspects for the RFC Communication ... 290
... 8.3 ... Summary ... 293
9 ... Special Topics ... 295
... 9.1 ... Local Update ... 295
... ... 9.1.1 ... Asynchronous Update ... 295
... ... 9.1.2 ... Local Update ... 297
... 9.2 ... Parameter Passings ... 298
... 9.3 ... Type Conversions ... 299
... 9.4 ... Index Tables ... 299
... 9.5 ... Saving Frontend Resources ... 300
... 9.6 ... Saving Enqueue and Message Service ... 301
10 ... Outlook ... 303
... 10.1 ... Important Changes to the Tools for the Performance Analysis ... 303
... ... 10.1.1 ... Performance Trace (Transaction ST05) ... 303
... ... 10.1.2 ... ABAP Trace (Transaction SAT ... 309
... 10.2 ... Important Changes to Internal Tables (Secondary Key ... 314
... ... 10.2.1 ... Definition ... 314
... ... 10.2.2 ... Administration Costs and Lazy Index Update ... 315
... ... 10.2.3 ... Read Accesses ... 315
... ... 10.2.4 ... Active Key Protection ... 317
... ... 10.2.5 ... Delayed Index Update for Incremental Key Changes ... 317
... ... 10.2.6 ... Summary ... 318
A ... Execution Plans of Different Databases ... 319
... A.1 ... General Information on Execution Plans ... 319
... A.2 ... IBM DB2 (IBM DB2 for zSeries ... 320
... A.3 ... IBM DB2 (DB2 for iSeries) ... 323
... A.4 ... IBM DB2 (DB2 for LUW) ... 326
... A.5 ... SAP MaxDB ... 329
... A.6 ... Oracle ... 332
... A.7 ... Microsoft SQL Server ... 336
B ... The Author ... 339
| Download: | Sample Chapter from this book |
Showing reviews 1-4 of 6 | Next
Posted by Anonymous on Jun 13th, 2013
Everyone has performance issues as the database grows over time. This book provides examples to allow developers to implement the proper techniques before there is a problem. A must have for large shop.
Posted by Ramakrishna kakarala on Jun 1st, 2013
I have this book,I am regularly using this book to get more tips to handle the real time Projects. I can say this is Powerful Tool for Consultants to handle the Projects more Successfully.
Posted by Maxim on May 12th, 2013
This book is very helpful! I suggest to all developers.
Posted by Miguel Maldonado on May 5th, 2013
It's an excellent guide to learn and improvement performance of the abap applications, I read several post in forums about it but this book is one the best guide definitly.
Showing reviews 1-4 of 6 | Next