ABAP PERFORMANCE TOOLS
AUTHOR: SUSHANT SINGH CHHATRYA (11066)
SAP BRF+ CONSULTANT
Purpose:
- To familiarize ABAP developers with the performance tools.
Scope:
- Include SAP tools to check performance for ABAP program.
- Covers Best performance guidelines as well.
Benefits:
- Empowers developers to leverage the use of provided tools by SAP and reduce
time as well as space complexity of the code.
JUNE 21, 2024
INVENIOLSI
SUSHANT SINGH 0
- Please note some points on best performance guidelines
- For In details description, separate documentation is
also provided. (ABAP_Best Performance)
- Here we only focus on tools to check ABAP Performance.
SUSHANT SINGH 1
Performance tools:
- Used to Check performance of SQL queries (SELECT
Query)
- 1. Activate the trace:
SUSHANT SINGH 2
- 2. Execute program for which you want to check trace.
- 3. Deactivate trace
- 4. Display trace as shown below
SUSHANT SINGH 3
- Filter with program name:
SUSHANT SINGH 4
- Can go to source code – Display ABAP code location as
highlighted below:
- Check time for each query(ms)
- Check which query taking max time, whether if there is
any scope of improvement
- Tune your code with the best practices of select query
SUSHANT SINGH 5
- ABAP TRACE
- Runtime analysis tool.
- Fully analyse the program.
- Run SAT Tcode:
- Execute and click back:
SUSHANT SINGH 6
- Target area which is taking maximum time:
- Sorted below, time is descending order:
- Select line item and display source code:
SUSHANT SINGH 7
- There may be case when SAP logic comes up where we cannot do
anything, leave them!
- Check other whether if there is scope of any improvement.
- Can compare – Previous runtime measurement and current
runtime measurement.
- We can keep a track of our code enhancement.
- We can use EVAULATE as shown below:
SUSHANT SINGH 8
- Below is the screenshot of how to compare:
- We have 2 measurements just to show as example here:
SUSHANT SINGH 9
- No need to run the program here.
- It is for Static check only.
- Below is the steps for EPC.
Note:
- It Checks for the unwanted code declaration.
- We can remove all this a part of tuning our code.
- Also, it checks for the best practices such as Text element error
for hard coding (Text-element important for translation as well)
- Uncomment the Exceptions code in FM
SUSHANT SINGH 10
- Use message class and do not hard code
- First look for all errors
Happy Learning
SUSHANT SINGH 11