&———————————————————————
*& Report Z9617_GET_IP
*&
&———————————————————————
*&
*&
&———————————————————————
REPORT Z9617_GET_IP.
DATA: opcode_usr_attr(1) TYPE x VALUE 5,
terminal TYPE usr41-terminal.
- 获取终端名 OPCODE 码在 TSKHINCL 252行
CALL ‘ThUsrInfo’ ID ‘OPCODE’ FIELD opcode_usr_attr
ID ‘TERMINAL’ FIELD terminal.
WRITE:/ ‘Terminal:’, terminal.
“获取登陆IP地址
DATA:ip TYPE string.
CALL METHOD cl_gui_frontend_services=>get_ip_address
RECEIVING
ip_address = ip
.
WRITE:/ ‘IP :’,ip.