You can use the command monitor to analyze long-running SQL statements and identify bottlenecks.
The command monitor is part of the CCMS in SAP systems.
In Database Studio, SQL performance analysis provides similar functions.
Database Administration in CCMS, Command Monitor
Database Studio, Analyzing the Performance of SQL Statements