‎2009 Aug 22 7:20 AM
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.
‎2009 Aug 22 11:10 AM
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
‎2009 Aug 22 7:53 AM
‎2009 Aug 22 7:59 AM
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
‎2009 Aug 22 11:10 AM
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
‎2009 Aug 22 12:10 PM