Application Development and Automation 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: 
Read only

IP Address field

Former Member
0 Likes
876

Hi all,

I have an situation where i need the system's IP Address not Server IP Address so where I can get that?

Thanks.

1 ACCEPTED SOLUTION
Read only

faisalatsap
Active Contributor
0 Likes
760

Hi, Rajule

Please test the following Sample Code Hope will solve out your problem,

DATA: ip_address TYPE string.

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: 'Your System IP Address is = ', ip_address.

Best Regards,

Faisal

4 REPLIES 4
Read only

Former Member
0 Likes
760

try methods from class cl_gui_frontend_services. (in se24)

Read only

former_member156446
Active Contributor
0 Likes
760
DATA: BEGIN OF usr_tabl OCCURS 10.
        INCLUDE STRUCTURE uinfo.
DATA: END OF usr_tabl.

DATA th_opcode(1) TYPE x.

DATA: size TYPE i.
CONSTANTS: opcode_list LIKE th_opcode VALUE 2.

CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_list
ID 'TAB' FIELD usr_tabl-*sys*.

DESCRIBE TABLE usr_tabl LINES size. " in debug look in usr_tabl you should find IP and comp name aslo
Read only

faisalatsap
Active Contributor
0 Likes
761

Hi, Rajule

Please test the following Sample Code Hope will solve out your problem,

DATA: ip_address TYPE string.

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: 'Your System IP Address is = ', ip_address.

Best Regards,

Faisal

Read only

0 Likes
760

Thanks Altaf.