How can I get the IP address of the system programmatically?
You can use cl_gui_frontend_services to get the system IP address.
DATA ip_addr(50) TYPE c.
CALL METHOD cl_gui_frontend_services=>get_ip_address
RECEIVING
ip_address = ip_addr
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
DATA terminal LIKE USR41-TERMINAL.
CALL FUNCTION 'TERMINAL_ID_GET'
EXPORTING
USERNAME = sy-uname
IMPORTING
TERMINAL = terminal.
* e-abap님에 의해서 게시물 이동되었습니다 (2007-11-05 12:45)