REPORT ZEXAMPLE.

DATA: BEGIN OF USER_STATISTIC OCCURS 0.

INCLUDE STRUCTURE SAPWLUENTI.

DATA: END OF USER_STATISTIC.

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

HOSTID LIKE SAPWLSERV-HOSTSHORT,

STARTDAT LIKE SAPWLACCTP-STARTDATE.

STARTDAT = SY-DATUM.

HOSTID = SY-HOST.

CALL FUNCTION 'SAPWL_WORKLOAD_GET_STATISTIC'

EXPORTING

PERIODTYPE = PERIODTYPE

HOSTID = HOSTID

STARTDATE = STARTDAT

TABLES

USER_STATISTIC = USER_STATISTIC

EXCEPTIONS

NO_DATA_FOUND = 1.

IF SY-SUBRC EQ 0.

LOOP AT USER_STATISTIC.

WRITE:/ USER_STATISTIC-TTYPE,

USER_STATISTIC-ENTRY_ID,

USER_STATISTIC-ACCOUNT.

ENDLOOP.

ELSE.

WRITE:/ 'NO USER STATISTICS'.

ENDIF.