REPORT ZEXAMPLE.

DATA: BEGIN OF SUMMARY OCCURS 0.

INCLUDE STRUCTURE SAPWLSUMRY.

DATA: END OF SUMMARY.

DATA: PERIODTYPE LIKE SAPWLACCTP-PERIODTYPE VALUE 'D',

HOSTID LIKE SAPWLSERV-HOSTSHORT,

STARTDAT LIKE SAPWLACCTP-STARTDATE.

DATA AVG(5).

STARTDAT = SY-DATUM.

HOSTID = SY-HOST.

CALL FUNCTION 'SAPWL_GET_SUMMARY_STATISTIC'

EXPORTING

PERIODTYPE = PERIODTYPE

HOSTID = HOSTID

STARTDATE = STARTDAT

TABLES

SUMMARY = SUMMARY.

LOOP AT SUMMARY.

IF SUMMARY-TASKTYPE = 'DIALOG'.

AVG = SUMMARY-RESPTI / SUMMARY-COUNT.

EXIT.

ENDIF.

ENDLOOP.

WRITE:/ 'AVERAGE RESPONSE TIME:', AVG.