REPORT ZEXAMPLE.

TABLES: MSXXLIST.

DATA: HOSTADDR LIKE MSXXLIST-HOSTADR,

TERMINAL(255),

ACT_SESSIONS LIKE SM04DIC-COUNTER,

MAX_SESSIONS LIKE SM04DIC-COUNTER,

MY_SESSION LIKE SM04DIC-COUNTER,

MY_INTERNAL_SESSION LIKE SM04DIC-COUNTER,

TASK_STATE LIKE SM04DIC-COUNTER.

DATA: DOT VALUE '.',

IP1 TYPE I,

IP2 TYPE I,

IP3 TYPE I,

IP4 TYPE I,

C_IP1(3) TYPE C,

C_IP2(3) TYPE C,

C_IP3(3) TYPE C,

C_IP4(3) TYPE C,

V_IPADDR(15).

CALL FUNCTION 'TH_USER_INFO'

IMPORTING

HOSTADDR = HOSTADDR

TERMINAL = TERMINAL

ACT_SESSIONS = ACT_SESSIONS

MAX_SESSIONS = MAX_SESSIONS

MY_SESSION = MY_SESSION

MY_INTERNAL_SESSION = MY_INTERNAL_SESSION

TASK_STATE = TASK_STATE.

* FORMAT THE IP ADDRESS

C_IP1 = IP1 = HOSTADDR(1).

C_IP2 = IP2 = HOSTADDR+1(1).

C_IP3 = IP3 = HOSTADDR+2(1).

C_IP4 = IP4 = HOSTADDR+3(1).

CONCATENATE C_IP1 DOT C_IP2 DOT C_IP3 DOT C_IP4 INTO V_IPADDR.

CONDENSE V_IPADDR NO-GAPS.

* DISPLAY THE REST OF THE INFORMATION

WRITE:/ SY-UNAME, 'INFORMATION:'.

ULINE.

WRITE:/ 'IP ADDRESS:', 20 V_IPADDR,

/ 'TERMINAL:', 20 TERMINAL,

/ 'OPEN SESSIONS:', 20 ACT_SESSIONS,

/ 'MAXIMUM SESSIONS:', 20 MAX_SESSIONS,

/ 'CURRENT SESSION:', 20 MY_SESSION,

/ 'INTERNAL SESSION:', 20 MY_INTERNAL_SESSION,

/ 'TASK STATE:', 20 TASK_STATE.