How does one obtain the IP address of a logon user in sap? Or how to view which IP addresses are logged on to sap:
In table: usr41, the specific fields are described as follows:
Mandt --- Client
Bname --- logon sap ID
Termid --- terminal ID (the meaning of this field is unknown)
Server---- SAP application server (central instance/dialoge instance)
Terminal ---- user computer (including IP address and hostname)
Sprache-language selected when logging on to sap
Logon_date --- logon date
Logon_time --- Logon Time
Bytes --------------------------------------------------------------------------------------------------------------
You have the following questions about the usr41 table:
1. How long does the table retain data?
2. Which table does the data belong?ProgramObtained?
3. Which of the following logs will be recorded in this table after logging on to sap?
From the official saying:
1. The table data may be real-time. However: During the RFC logon with the logon screen, entries occur in Table usr41 which are not deleted during the log off.
2. rsm04000
3. users who have logged on through the GUI will certainly log on to this table.
---------------------------------------------------
SAP User Logon EnhancementUser GUI LogonValid,RFC access Logon(For example, jco) is invalid. Enhancement type isCmod/smod, Enhanced exit (exit) isSusr0001.
1. Enhancement procedure
- Tcode smod, "strengthen" input susr0001, "object component" select "component", and click "modify ".
- Double-click the function module name "exit_saplsusf_001 ″
- Function exit_saplsusf_001 already existsCode"Include zxusru01". Under se80, create include zxusru01.
- Enter the required code in zxusru01.
- Activation enhancement. In tcode smod, "strengthen", input susr0001, and click "test". Select exit_saplsusf_001 to activate.
2. Enhanced login data acquisition
In zxusru01, you can enter the required code to control the logon action. Common Data Acquisition:
Username of the currently logged-on user:SY-UNAME
IP address of the current logon User:Call method cl_gui_frontend_services => get_ip_address
All current logins: Table uinfo
Iii. logon enhancement code example
The following code limits the user's IP address, that is, only allow the user testuser to log on from ip192.168.0.1. Otherwise, the system prompts that the user has no permission and the user is interrupted.
Data: IP type string,
Count type I.
Call method cl_gui_frontend_services => get_ip_address
Processing ing
Ip_address = IP.
If SY-UNAME = 'testuser' and IP <> '192. 168.0.1 ′.
Message e157 (00 ).
Endif.
4. Note
- This enhancement can only intercept GUI logon, and cannot intercept RFC logon. I have not foundExit for RFC Logon? Please advise me if anyone knows.
- The enhancement takes effect only after activation. For more information, see Step 5.
- After zxusru01 is created, you can double-click "include zxusru01" in function exit_saplsusf_001 to edit it.