REPORT ZEXAMPLE.

DATA: WL_DIR LIKE SAPWLDIR OCCURS 1 WITH HEADER LINE,

NUM_LINES LIKE SYST-INDEX.

DATA: BEGIN OF ITIME_FRAME OCCURS 1,

FILLER(14) TYPE C,

VALUE(7) TYPE C,

END OF ITIME_FRAME.

CALL FUNCTION 'SAPWL_WORKLOAD_GET_DIRECTORY'

TABLES

DIRECTORY = WL_DIR.

DESCRIBE TABLE WL_DIR LINES NUM_LINES.

IF NUM_LINES > 0.

LOOP AT WL_DIR WHERE PERIODTYPE = 'M' AND HOSTID <> 'TOTAL'.

CONCATENATE WL_DIR-STARTDATE+4(2)

WL_DIR-STARTDATE+0(4)

INTO ITIME_FRAME-VALUE SEPARATED BY '/'.

APPEND ITIME_FRAME.

ENDLOOP.

ELSE.

CONCATENATE SYST-DATUM+4(2) SYST-DATUM+0(4)

INTO ITIME_FRAME-VALUE SEPARATED BY '/'.

APPEND ITIME_FRAME.

ENDIF.

*DELETE DUPLICATE INFO FROM MULTIPLE APP. SERVERS

SORT ITIME_FRAME BY VALUE+3(4) VALUE(2) ASCENDING.

DELETE ADJACENT DUPLICATES FROM ITIME_FRAME COMPARING VALUE.

LOOP AT ITIME_FRAME.

WRITE:/ ITIME_FRAME-VALUE.

ENDLOOP.