On this page:
On this page:
This section describes the procedure for manual ABAP code adjustments, which are useful when automatic instrumentation is not supported.
Please note that this section only covers enhancement of already detected business transactions, i.e. the code must be executed in the context of existing business transaction, otherwise it won't be monitored. SAP GUI dialog transactions are reconstructed into business transactions from log data, so no business transaction context exists during runtime.
To enable collection of performance data for a section of custom ABAP code, use the class /DVD/APPD_CL_RUNTIME to start and stop the runtime measurement:
The code above collects the number of calls and total runtime of the specific action. These metrics are stored in the transaction snapshot (top five custom actions ordered by runtime).
Make sure the action_stop( ) is always called for the monitored action:
- If an exception is raised during the action, call the action_stop( ) method in the CATCH section to stop the measurement
- Make sure there are no EXIT, RETURN or other commands which interrupt the action and avoid the action_stop( ) call
If the runtime measurement is not stopped properly, the performance data might not be collected, or can be collected incorrectly.
Custom RFC Exit Calls
To enable correlation of custom RFC calls, adjust the ABAP code before and after the CALL FUNCTION ... DESTINATION as in the example: