2008 Jan 23 10:22 AM
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?
2008 Jan 23 10:25 AM
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?
2008 Jan 23 10:25 AM
2008 Jan 23 10:25 AM
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...
2008 Jan 23 10:29 AM
Thanks Dhawani and Smith.
Query resolved and points rewarded.
2008 Jan 23 10:29 AM
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.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |