cancel
Showing results for 
Search instead for 
Did you mean: 

Userexit before user logoffed

Former Member
0 Kudos

Hi, all!

Is there any userexit(customer-exit, badi) which is executed just before user logoffs(after user confirm system logoff)?

Regards,

Maxim.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Maxim,

I don't think there's on available (yet?!). However, there seems to be an alternative solution to this, which you can find in .

Regards,

Anand Mandalika.

Former Member
0 Kudos

Hi, Poornanand!

Thanks for your time. I should do more forum search next time.

Regards,

Maxim.

Former Member
0 Kudos

Hi Maxim;

Extending on that thread that Anand referenced (which I started), I can share with you what we did.

For SOX purposes, we decided on a cheap solution to monitor any super user activity in the system. What we did was trap the super users in the enhancement project SUSR0001 by checking in table UST04 (for anyone with SAP_ALL), or in USR02 to see if the user was assigned to the SYSTEM or SUPER user groups. If a user with any of those attributes logged on, we send an e-mail to the managers indicating what happened.

To trap the user log off, we trigger an event in the log on user exit to start a background job that checks USR41 to see if the user is still logged on. We get the terminal name and IP address in the log on user exit to make sure we are tracking absoultely the right user. The job checks every minute for the log off and, when it occurs, we collect the transactions that the user executed and we e-mail that to the managers as well.

-John

Answers (1)

Answers (1)

WolfgangJanzen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Please notice that a session can be terminated abnormally - in such a case no userexit will be processed. Same is true when the session is terminated "the hard way" (e.g. when entering "/nex" into the SAPGUI command line field).

Only when performing a proper "logoff" (SAPGUI menu: system -> logoff) a certain ABAP coding is processed where you could place your "userexit": see PAI module "D0011_MOD_INP" of dynpro "SAPMSDYP 0011" (use transaction SE51 to display).

If you can leave with the fact that this exit might not be processed under all circumstances that's the right place to hook your logoff coding.

Regards, Wolfgang