메뉴 건너뛰기

SAP 한국 커뮤니티



IP를 가져오는 클래스 메소드 및 함수

sapjoy 2007.04.04 09:22 조회 수 : 4931 추천:25

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)