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: 

Function module to find terminal IP address

Former Member
0 Kudos

Hi,

Can anyone tell me what is the function module to get IP address of the machine from which I am logging into SAP server.

I can see that IP address in SM04 for my terminal but is there functional module which can fetch this terminal details in an ABAP report?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

terminal_id_get

4 REPLIES 4

Former Member
0 Kudos

hi,

terminal_id_get

Former Member
0 Kudos

hi,

try this

DATA terminal LIKE usr41-terminal.

CALL FUNCTION 'TERMINAL_ID_GET'

  • EXPORTING

  • username = sy-unamegf

IMPORTING

terminal = terminal.

WRITE:/ 'Terminal:',terminal.

reward if usefull...

0 Kudos

Thanks Dhawani and Smith.

Query resolved and points rewarded.

Former Member
0 Kudos

hi,

this is the code which gives the ip address

DATA ip_addr TYPE c LENGTH 50.

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.

if sy-subrc <> 0.

write:/'address not received'.

else.

write:/'ip adress = ',ip_addr.

endif.

reward points if useful.