What to use to measure performance improvement
You know of ST05, ST01 and SE30. But do you know why you would use one transaction code and not the other? What are the main purposes of each one when it comes to performance improvement and measurement?
To measure and improve performance of ABAP programs – Use SE30 to measure:
- Excessive or unnecessary use of modularization units
- CPU-intensive program functions
- User-specific functions that could be replaced with ABAP statements
- Inefficient or redundant database access.
In addition you may want to analyze or fine-tune a program’s database accesses – Use ST05 to measure:
- Database accesses (SQL trace)
- Table buffers
- RFC calls
- Lock operations (client side)
If you wishto fine tune the system – use ST01 to measure:
- Authorization checks
- Kernel functions
- Kernel module
In addition ST01 encompasses the majority of the functionality of ST05.
Measure specific portions of ABAP Runtime
Most people know about SE30 which can be used to do an ABAP runtime analysis. However did you know that you are able to dynamically call the runtime analysis for a portion of source code for example a section of a user exit, or for a specific function module?
This is easily done by changing the user variant as follows:
- Open SE30
- On Measurement restrictions (1/2 way down the page) create/change your user defined variant.
- Within the variant under program parts, select the “particular Units” check box and save.
Now from within SE38 for the code you wish to measure – set your breakpoint for the position from which you wish to measure and another for the position to which you wish to measure.
Go back to SE30 and execute your code when you reach the breakpoint activate the runtime analysis from System–>Utilities–>Runtime Analysis –> Switch On.
Run through the code by selecting F8.
When you reach your end point de-activate the analysis by selecting System–>Utilities–>Runtime Analysis –> Switch Off.
TIP: You can activate the runtime performance analysis start by entering the command prompt code /RON in the transaction box. You can de-activate the analysis by using the command prompt code /ROFF.
NOTE: If you get the message “The Particular “units” option is not selected – S7100. It means you are not using your new changed default user variant for the execution.
How to Scan ABAP Sources for Specific Strings
It is simple to locate a string within a program but have you ever wondered how to find all programs where a specific ”string”, or line of text, or object name, is used.
There is a wonderful report which is I use to find ABAP programs related to specific search terms.
- The Report name is – RPR_ABAP_SOURCE_SCAN
- You can execute it from transaction SA38 or SE38.
Some useful benefits of this report are:
You can limit the search range of the programs for example to your custom built developments only for example all programs starting with Y* or Z*.
Tip - Another similar program is RKCTSEAR.
Compare ABAP objects across systems
So you know how to use OY19 to see and compare cross system customising objects and you know how to use SE39 to see and compare an ABAP program across systems. But do you know how to search and compare all ABAP objects across a system?
For example you have made a system copy and want to compare all Z* and Y* programs?
You can do this with Transaction Code – SREPO - Repository Comparison.
1) Select the RFC destination (you can use SM59 to do this).
2) Select “Customer Objects and Modified SAP objects”
Then follow the wizard.
SAP Tips – Using field PSTYV in a Pricing condition table
For technical reasons, the field PSTYV was included in the structure KOMP, but not in the structure KOMG (Allowed Fields for Condition Structures).
To solve the problem, proceed as follows:
1. Call the ABAP Dictionary (transaction SE11) and create the data type ZZPSTYV. Select PSTYV as the domain. As the short description, you can use ‘ZZ – Sales Document Item Category’ (for example) and as the field labels, you can use the field labels of the data type PSTYV. Save, check and activate your entries.
2. In the ABAP Dictionary (transaction SE11), enter the structure KOMPAZ, switch to change mode and make the following entries:
Component Component type
ZZPSTYV ZZPSTYV
Save, check and activate the change.
3. Note: Due to the changes in the structure KOMPAZ, the field ZZPSTYV is now known in the structures KOMG and KOMP because the structure KOMPAZ is included in both structures.
4. Call transaction SPRO. Go to ‘Sales and Distribution > Basic Functions > Pricing > Pricing Control’ and execute ‘Define Condition Tables’. Select ‘Conditions: Allowed fields’ and enter ZZPSTYV as a new entry.
5. Note: When you create the condition table Axxx, you can now use the field ZZPSTYV as a key field.
6. Populate the new field you defined by including the following source code line in the user exit USEREXIT_PRICING_PREPARE_TKOMP: MOVE xxxx-PSTYV TO TKOMP-ZZPSTYV.
In order processing, the user exit is available in the include MV45AFZZ, and in billing document processing, it is available in the include RV60AFZZ
Remember too that you can use this technique for other user defined fields. For header fields, use the structure KOMKAZ instead of the structure KOMPAZ, and use the user exit USEREXIT_PRICING_PREPARE_TKOMK instead of the user exit USEREXIT_PRICING_PREPARE_TKOMP.
More information is available in transaction SPRO when you go to ‘Sales and Distribution > System Modifications > Create New Fields (Using Condition Technique) > New Fields for Pricing’, and in OSS Note 21040
SAP Tips – Generate Routines Automatically in each target client
User Exits For Billing

User Exits For Credit Checks Availability Check And Risk Management
Credit Check
If you want to carry out your own individual credit checks, that differ from those in the standard system, you must define them in the following user exits:
User Exits for Partner Determination
Partner determination contains the following user exits for your use:
User Exits For Price Determination
Relational Operators – ABAP Basics
So you are not an ABAPer and you need a crash course in logic, generally you can understand a whole lot if you master these basics: Relational Operators
SAP Tips – Debugging technique
We know we can use “/h” in transaction code (command field) box to debug. Then step through the code to find a bug. If you have a problem locating the cause of the bug , you can use this basic technique;
- Transaction /h
- Then, step through by pressing F6 until the error is found. (count how many times you press F6.) for example 5 times.
- Then re start the process and step through by pressing F6, 1 time less than before, for example 4 times, then press F5, and step through until you find the error. Read more

Tip – Pricing analysis
This is one good standard SAP tool for pricing analysis.
Transaction : PRCAT
The more you dig the more it is helpful
AB4Editor Control – ABAP Editor Layout Old and New
Great Tip:
Remember that your user ID settings for the ABAP editor you prefer are stored in SE38 –>Utilities–>Settings. Read more 
Tip – IDoc messages
Tip – Did you know that you can control system responses to specific messages in specific scenarios, this is useful for IDoc processing, you may wish the system to ignore specific messages or error on specific messages. You can control this via transaction SMME.
Compare ABAP programs
I have 2 routines, for example 2 item category copy control data transfer routines, how do I see the differences within the routines easily?
Answer – Use transaction code SE39. Enter the 2 ABAP program names, 1 for left and 1 for right, then press enter. You will see the 2 programs in the split screen editor. Now select the “Compare” icon or (Ctrl+Shift+F11). The system will show you the inconsistent lines in the code by highlighting them in blue. (Press Ctrl+Shift+F10 to see the next difference.)You can also use this transaction to connect to another system via RFC to compare code.





