Hi
My Question is very simple; can we track user login information? Yes, one way is there, I think everybody knows the answer, but let me explain.
To activate any of the exit, that’s trigger at the time of login.
Yes the same way I did, I Activate the SUSR0001 Exit. And write codes to store login Information of the User.
But here my point comes, from where user is accessing or accessed the System?
Yes, there it is, above a marker in MAP, Now my analysis comes here, I did some analysis and modified the login information while doing the storage process.
Here I have used an already created Web Service, to get the Public IP address of the Used System and location based information.
Below are the Steps which I have followed to store the Information and display the Google MAP with the Login location.
As I have explained, we have to store the User Login Information, since SAP is not storing the
All Login information, you can check the current login information in USR41 Table,
Once you log-off and re-login, the current login information will update into the same table.
So I have to store the all Login Information in custom table, Below is the Table Information
In the above table, I am storing the all information which I need.
In attachment (UPDATE_LOGIN) Methods to update the Information into ZLOGIN table.
Inside the Method, I have used
web service to get the Public IP and Location Information in JSON format.
Method in GET_WEB_SERVICE_INFO attachment, in this method, I am passing Web Service URL and getting the JSON format information in E_INFO parameter.
2.Activate the Google Service for SAP, though SAP used IE as default browser,
I have used CL_GUI_HTML_VIEWER class to display the Google map in SAP screen.
When I have tried 1st time, the map itself not displaying and I did some analysis and found. SAP opens IE (Internet Explorer) as default browser.
I have put a thread in this forum and found the Answer. it's contains the all changes information to activate the Google service in SAP.
Note: All Changes has to do in Application Server Side.
http://scn.sap.com/thread/3678742
3. Activate Google API MAP in Google
To use Google MAP in coding, we require Google Service Key, Please find the below link to activate the Google API Key.
https://developers.google.com/maps/documentation/javascript/tutorial
Follow the all steps from the above link, and generate the API key.
I have stored the API Key Information in customize Table and fetch the same through Class Method.
Below is the table, where I am storing the Information.
In this table, I am storing the MAP API key, Map Type and Map Refresh Time.
Based on the user id, I am storing the information.
Below are the Methods I am using to SET and GET the information from the ZGEOKEY table.
a. SET_GEO_KEY
b. GET_GEO_KEY
Please find the SET_GEO_KEY and GET_GEO_KEY method code in attachment.
SAP User Tracking System - Part 2
Happy Learning.. :smile:
Praveer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
3 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |