In this post, we will detail how to retrieve SAP user Login History from SAP log system using different Methods to retrieve the login history for any SAP user and the list of SAP transaction Codes executed by a SAP user. In the last part, we will explain how to custom tracking the SAP login action.
Table of Contents
ST03N : SAP User Login History
The most used method to retrieve SAP User login history is using the standard SAP Transaction Code ST03N.
Go to ST03N -> Switch to Expert mode in the upper left corner -> Expand the node Total and select the time period (day, week, month) -> Expand the node User and Settlement Statistics and select User Profile -> Doubleclick the user you want and you get a list with transactions
SM19 & SM20 : User Login History using SAP Log
The second method is to use SAP Audit System.
First you need to activate the SAP audit. Use the SAP Tcode SM19 for Security Audit Configuration.
Then use SM20 for all the SAP user history including:
- Reports he ran
- Password Change
- Lock and Unlocked User
- Authorization Change …
List of SAP SM* Transaction Codes
Here the main SAP SM* Tcodes used for User, System Administration … :
|SM04||Logons to an AS Instance|
|SM05||HTTP Session Management: Monitoring|
|SM12||Display and Delete Locks|
|SM13||Administrate Update Records|
|SM14||Update Program Administration|
|SM18||Reorganize Security Audit Log|
|SM19||Security Audit Configuration|
|SM20||Analysis of Security Audit Log|
|SM20N||Analysis of Security Audit Log|
|SM29||Model Transfer for Tables|
|SM30||Call View Maintenance|
|SM31||Call View Maintenance Like SM30|
|SM32||Maintain Table Parameter ID TAB|
|SM33||Display Table Parameter ID TAB|
|SM34||Viewcluster maintenance call|
|SM35||Batch Input Monitoring|
|SM36||Schedule Background Job|
|SM37||Overview of job selection|
|SM37B||Simple version of job selection|
|SM37C||Flexible version of job selection|
|SM38||Queue Maintenance Transaction|
|SM49||Execute external OS commands|
|SM50||Work Processes of AS Instance|
|SM51||Started AS Instances|
|SM52||Virtual Machine Overview|
|SM53||VMC Monitoring and Administration|
|SM56||Number Range Buffer|
|SM58||Asynchronous RFC Error Log|
|SM580||Transaction for Drag & Relate|
|SM59||RFC Destinations (Display/Maintain)|
|SM5A||RFC Chain Analysis|
|SM5B||Maintenance of DPTIMETAB|
|SM61||Backgroup control objects monitor|
|SM61B||New control object management|
|SM62||Event History and Background Events|
|SM63||Display/Maintain Operating Mode Sets|
|SM64||Manage Background Processing Events|
|SM65||Background Processing Analysis Tool|
Check also SAP Tcodes Workbench: ABAP Workbench Tcodes
RSUSR200 Report for SAP User Login History
An other way to Retrieve the list of User history for login in SAP System is to run the standard SAP report RSUSR200.
The RSUSR200 is for List of Users According to Logon Date and Password Change.
You want really get all the login history. But you can see the last login information and the last user’s password change.
STAD: SAP transaction Codes used by user
STAD is the SAP standard transaction for Statistics display for all systems.
You can select the User Id and you will have all the detail about the login, transactions and Reports that this particular user has launched.
SAP Login History Tables
The SAP Login history tables used to track user login are:
- USR02: Logon Data (Kernel-Side Use)
- TRDAT: SAP Last Logon Date
- LTIME: SAP Last Logon Time
- WCR_USERSTAT: login log for Portal
Custom/Exit SAP Login History Track
If you want to track more actions or you need a specific report for User Login History in SAP, you can develop your own ABAP code using the user-exit SUSR0001.
The function-exit is EXIT_SAPLSUSF_001.
Note that used is triggered only for SAPGUI type “DIAG” logon. It is executed After successful SAPGUI logon. Check SAP Note 37724 for more information
If you are not familiar with CMOD, here a good article on Implementation of SAP logon user exit SUSR0001