04-21-2006 10:32 AM
Hi,
Is ther any way to find the IP address of a computer using ABAP.
Regards
Ahasan
04-21-2006 10:33 AM
click on RUN, give COMMAND
u will go to command prompt, there give IPCONFIG, u will get IP ADDRESS
04-21-2006 10:33 AM
click on RUN, give COMMAND
u will go to command prompt, there give IPCONFIG, u will get IP ADDRESS
04-21-2006 10:37 AM
Hi,
Thank you.But I want it using ABAP.Is there any way.
Thanks and Regards
Ahasan
04-21-2006 10:39 AM
data: ip_address(50).
call method cl_gui_frontend_services=>get_ip_address
receiving
ip_address = ip_address
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
.
write:/ ip_address.
Refer above code.
Regards,
Ravi
04-21-2006 10:35 AM
04-21-2006 10:37 AM
Use the FM : TERMINAL_ID_GET
DATA terminal LIKE USR41-TERMINAL.
CALL FUNCTION 'TERMINAL_ID_GET'
EXPORTING
USERNAME = SY-UNAME
IMPORTING
TERMINAL = terminal
.
04-21-2006 10:36 AM
Use the class method CL_GUI_FRONTEND_SERVICES=>GET_IP_ADDRESS
Regards,
Ravi