cancel
Showing results for 
Search instead for 
Did you mean: 

User's LOGOFF data/information

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Cynthia,

Thanks for your info about the table.

I will try it. We are on 4.7.

Naved

ssimsekler
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

ssimsekler
Active Contributor
0 Kudos

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