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.