SAP Function ST04_DB4_GET_STAT_OVERVIEW - AS/400: Get Database statistics for ST04 Main Screen

Parameter Reference Type Length Default Optional Text
CURRENT_SYSTEM DB6NAVSYST u 992 X DB6: System Registration Table
DBHOST DB6NAVSYST-DBHOST C 255 X R/3 System, Name of Application Server
RESETFLAG DB4QQPAR-QRESET C 1 SPACE X Character field currently not used
SCHEMANAME DB6NAVSYST-SCHEMANAME C 20 X DB6: Schema Name
SYSTEM_ID DB6NAVSYST-SYSID C 8 X Name of SAP R/3 System

Parameter Reference Type Length Text
DATE SYST-DATUM D 8 Date of analysis
DB_STATS SQHIST_DB4 u 316 DB statistic: User calls and performance data
SUM_WAITS DB4WTSTS_S-WDB I 4 Sum of waits (db + non-db + int.machine)
SUM_WAIT_TIMES DB4WTSTS_S-WDBT P 8 Sum of wait times (db + non-db + int.machine)
TIME SYST-UZEIT T 6 Time of analysis
WAIT_STATS_DATE SYST-DATUM D 8 date of wait statistic analysis
WAIT_STATS_SUMMARY DB4WTSTS_S u 80 Summary of wait statistic of all instances
WAIT_STATS_TIME SYST-UZEIT T 6 time of wait statistic analysis
WAIT_STAT_SUBRC SYST-SUBRC I 4 Error code of DB4_GET_WAIT_STATISTIC

Parameter Reference Length Optional Text
DBMON_HEADER_INFO DB4DBMON 100 X DBMonitor info (oldest data, dump, merge)

Exception Text
NO_DB_STATS_AND_WAIT_STATS_ERR No perf. data found & DB4_GET_WAIT_STATISTIC-err
NO_DB_STATS_FOUND No data found in the performance tables
WAIT_STATS_ERROR Error in DB4_GET_WAIT_STATISTIC

Functionality
The function module collects the data to be displayed on the initialscreen of transaction ST04 in mySAP ERP on IBM iseries:

  • DATE and TIME of analysis: timestamp of current execution of this
  • function module
    • structure DB_STATS comprises counts of executed SQL statements (such as
    • number of selects or inserts) and counts about how these statements wereexecuted (such as number of table scans or index creates performed).
      • WAIT_STATS_DATE and WAIT_STATS_TIME; timestamp of wait statistic
      • analysis
        • SUM_WAITS, SUM_WAIT_TIMES, WAIT_STATS_SUMMARY: wait statistic
        • information (summarized about all instances currently running) ascomputed by the function moduleDB4_GET_WAIT_STATISTICS.
          • WAIT_STAT_SUBRC: error code of function module
          • DB4_GET_WAIT_STATISTICS.
            • DBMON_HEADER_INFO: information about DB Monitor activity as shown in the
            • list header of ST04.

              Example
              An example on how to use this function module is found in RSDB400X (mainprogram for transaction ST04 for mySAP ERP on IBM iSeries).

              Notes
              The database statistics are computed from the mySAP ERP performancetables, this data is collected by the IBM iSeries OS/400 memory baseddatabase monitor.
              The wait statistics are cumputed in the function moduleDB4_GET_WAIT_STATISTICS.