Trigger some functions when the User logs into SAP SYSTEM
There are 2 ways to do this one, but the best way is to use the user exit.
1) We have a Function module 'NAVIGATION_SET_START_TCODE' , in this function module we can pass the Username and the transaction code to start that transaction code when the user logs into SAP system
2) The second and the best way is to use the user exit.
The exit name is SUSR0001, just activate this User exit, and write the code inside the user exit to start that functionality when the user logs into SAP system, here in this user exit, we can restrict the user by using the simple if conditions or else we can use the Authorization checks to restrict the users or some functions.