on 07-15-2004 4:48 PM
Hi,
I want to know where the 'logoff' info is maintained for a user in R/3.
I want to calculate/capture the 'duration' a user logged onto the system
Thanks
Naved
Hi Naved:
I have the same requirement as you.I want to capture the LogOn & LogOff Time from SAP.Did you succeed in your search.I tried all possibilities and finally didnot get an easy solution.Pl suggest what method you used.
Pl Help
Gisk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
USR41 is the table that contains IP address/machine inforation for all currently logged on users. You can set up a periodic job to collect this information. The frequency of the job will determine how precise you can make the "log off" times.
Regards, Cynthia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
The information for last logon time can be retrieved by using the function module "SUSR_USER_LOGONDATA_GET". It is in the field 'LTIME' of the output parameter 'USER_LOGONDATA' (structure: USLOGOND). It is obviously more difficult for SAP to notice a precise logoff data because of unexpected session ends.
I know this is not enough but an always-running (small interval) job may check logged users (function module: TH_USER_LIST) and their last logon time to accumulate the duration and define user status. Still I believe that there should be some more efficient solution because I remember a transaction showing such kind of data for a user. But SAP may store these data in files (or possibly in cluster tables) rather than in transparent tables. If so, we must find some function to read those.
I'll think about this and write if I find something.
*--Serdar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply. I noticed that the <i>(structure: USLOGOND).</i> below has 'last LOGON TIME'. I am looking for LAST LOGOFF TIME. [Any help is appreciated]
GLTGV XUGLTGV DATS 8 0 User valid from
GLTGB XUGLTGB DATS 8 0 User valid to
USTYP XUUSTYP CHAR 1 0 User Type
CLASS XUCLASS CHAR 12 0 User group in user master maintenance
ACCNT XUACCNT CHAR 12 0 Account ID
TZONE TZNZONE CHAR 6 0 Time zone
<b>LTIME XULTIME TIMS 6 0 Last logon time</b>
BCODE XUCODE RAW 8 0 Password Hash Key
CODVN XUCODEVERS CHAR 1 0 Code Version of Password Hash Key Algorithm
Hi Naved
I am aware that 'LTIME' stores the time of last logon. But my argument was utilizing this data and also the function module "TH_USER_LIST" (this FM may be used alone to solve) to accumulate durations with a job scheduled for short time intervals. Of course this is not a feasible solution.
Also there is a problem with "LTIME'. If you logon a second session without logging off from a recent active session, it gives the time of last logon only.
I do not know the technical infrastructure but how can SAP store last logoff time precisely. What should the procedure be for unexpected connection cuts. May be SAP is checking online users time to time (this is what I suggested you to do in ABAP). If SAP system is doing this, then it must store data somewhere in system logs I think.
I hope this may be a kind of "any help"
*--Serdar
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.