Get IP address of the user in SAP ABAP
2018-01-29 08:45
2341 查看
We can get IP Address of the logged in user in SAP using two ways.
Generally this kind of requirements are rare, but in some developments where we need to track user login IP.
Using Function module TERMINAL_ID_GET
Using Class method CL_GUI_FRONTEND_SERVICES=>GET_IP_ADDRESS
Generally this kind of requirements are rare, but in some developments where we need to track user login IP.
Using Function module TERMINAL_ID_GET
Using Class method CL_GUI_FRONTEND_SERVICES=>GET_IP_ADDRESS
Get IP address using TERMINAL_ID_GET
REPORT ZSAPN_GET_IP. DATA : IP TYPE STRING. DATA : TEMP TYPE STRING. DATA : LV_TERMINAL TYPE USR41-TERMINAL. **Call function module to get terminal CALL FUNCTION 'TERMINAL_ID_GET' * EXPORTING * USERNAME = SY-UNAME IMPORTING TERMINAL = LV_TERMINAL EXCEPTIONS MULTIPLE_TERMINAL_ID = 1 NO_TERMINAL_FOUND = 2 OTHERS = 3. IF SY-SUBRC <> 0. WRITE :/ 'Error in getting terminal'. ENDIF. **Terminal contains IP address and computer name ex: 127.0.0.1-USER SPLIT LV_TERMINAL AT '-' INTO IP TEMP. WRITE:/ IP.
Get IP address uisng CL_GUI_FRONTEND_SERVICES=>GET_IP_ADDRESS
REPORT ZSAPN_GET_IP. DATA : IP TYPE STRING. IP = CL_GUI_FRONTEND_SERVICES=>GET_IP_ADDRESS( ). WRITE :/ IP.
相关文章推荐
- Get the IP address of a network interface in C using SIOCGIFADDR
- iphone dev 入门实例5:Get the User Location & Address in iPhone App
- Using PowerCLI to get the IP address of a VM
- Get Local IP Address and Set in the IP Control
- How can I get the IPv4 address of an interface in linux from C code ?
- Correct Method of Changing the IP Address in 11i & R12 (Doc ID 751328.1)
- the tables of the user in SAP
- WLAN Roaming - the basics Even if you keep the same IP address, things get complicated.
- The study of Programming Windows with MFC--Ip Address control and Date control
- WLAN Roaming - the basics Even if you keep the same IP address, things get complicated.
- How can i get hold of all of the visible items in my QListView?
- Get local IP address in F#
- Get IP Address in Android 4.0+
- Get the rows count of all the table in Sybase
- The method getDatas(LoginDTO) of type IUserBizImpl must override a superclass method
- Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts.
- Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts.
- How to get the HTML source of a webpage in Ruby
- How Would You Get the Count of an Array in C++?
- Pushing the Limits of User-Defined Runtime Attributes in Interface Builder