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 covers only the enhancement of already detected business transactions, i.e. the code must be executed in the context of the existing business transaction, otherwise it is not monitored.
SAP GUI dialog transactions are reconstructed into business transactions from log data, so no business transaction context exists during runtime.
To enable the collection of performance data for a section of custom ABAP code, use the /DVD/APPD_CL_RUNTIME class to start and stop the runtime measurement:
The preceding code collects the number of calls and the total runtime of the specific action. These metrics are stored in the transaction snapshot (top five custom actions ordered by runtime).
Ensure 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
- Ensure 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 mentioned in the example:
The code above starts a new exit call to the RFC backend. If the target system is an instrumented ABAP or Java system, then the correlation information is propagated and the business transaction continues on the target system.
For ABAP target systems, the user associated with the RFC destination, or the user making the RFC call must have sufficient authorizations on the target system. See SAP Authorizations (auth. role /DVD/APPD_RFC_ABAP).
For RFC exit calls to work properly on Java JCo Server, the Java system must be restarted after the first installation of the JCo plugin version 4.5.2002 or newer.
Only the following RFC destination types are supported for custom RFC exit calls:
- ABAP Connections (type '3' destination)
- TCP/IP connections (type 'T' destination)
Please make sure that the used destination is a supported destination type before enhancing your code.