Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IP Address

Former Member
0 Kudos

Hi,

Is ther any way to find the IP address of a computer using ABAP.

Regards

Ahasan

1 ACCEPTED SOLUTION

hymavathi_oruganti
Active Contributor
0 Kudos

click on RUN, give COMMAND

u will go to command prompt, there give IPCONFIG, u will get IP ADDRESS

6 REPLIES 6

hymavathi_oruganti
Active Contributor
0 Kudos

click on RUN, give COMMAND

u will go to command prompt, there give IPCONFIG, u will get IP ADDRESS

0 Kudos

Hi,

Thank you.But I want it using ABAP.Is there any way.

Thanks and Regards

Ahasan

0 Kudos

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

andreas_mann3
Active Contributor
0 Kudos

-> use class CL_GUI_FRONTEND_SERVICES

0 Kudos

Use the FM : TERMINAL_ID_GET

DATA terminal LIKE USR41-TERMINAL.
CALL FUNCTION 'TERMINAL_ID_GET'
 EXPORTING
   USERNAME                   = SY-UNAME
 IMPORTING
   TERMINAL                   = terminal
          .

former_member181962
Active Contributor
0 Kudos

Use the class method CL_GUI_FRONTEND_SERVICES=>GET_IP_ADDRESS

Regards,

Ravi