Acquisition of user IP information in SAP

Source: Internet
Author: User
Tags rfc

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
    1. Tcode smod, "strengthen" input susr0001, "object component" select "component", and click "modify ".
    2. Double-click the function module name "exit_saplsusf_001 ″
    3. Function exit_saplsusf_001 already existsCode"Include zxusru01". Under se80, create include zxusru01.
    4. Enter the required code in zxusru01.
    5. 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
    1. 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.
    2. The enhancement takes effect only after activation. For more information, see Step 5.
    3. After zxusru01 is created, you can double-click "include zxusru01" in function exit_saplsusf_001 to edit it.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.