2018 Jul 12 3:55 PM
hi,
i am using an user exit at SAP GUI logon screen where i force specific users with a popup to enter some data before logging in (for audit reasons), see screenshot.

The problem now is that the user can open a new mode with the icon at top left of the popup window:

So the user gets into SAP without entering the data there.
Is there any way to avoid that user can open a new mode ? I have no idea how wo avoid it.
br Martin
hi,
i am using an user exit at SAP GUI logon screen where i force specific users with a popup to enter some data before logging in (for audit reasons), see screenshot.

The problem now is that the user can open a new mode with the icon at top left of the popup window:

So the user gets into SAP without entering the data there.
Is there any way to avoid that user can open a new mode ? I have no idea how wo avoid it.
br Martin
2018 Jul 13 1:54 AM
Its seem like that button is SAP internal design so you cant disable it as normal. There is some fm that call a popup without create new session option like TH_POPUP, WS_MSG...but they call the cfunc of SAP to handle it. Or you can try GuiTX, i didnt do it before but may worth a try: https://archive.sap.com/documents/docs/DOC-4608
2018 Jul 13 7:36 AM
FM like TH_POPUP is not useable, as i have to enter the 3 fields (see my first screenshot). Never worked with GuiTX, how to handle it ?
2018 Jul 13 7:44 AM
I guess you are using SUSR0001 user exit to present the pop up window after successful logon. Please note that the exit is called after the user is already logged on. Thus to my knowledge there is no way to prevent the user from creating a new session.
As a workaround I might suggest to enhance SUSR0001 implementation with a check if the ticket number is provided, if not you may kill other sessions of the user. Check out function TH_LONG_USR_INFO to read the session (modes) of a user and TH_DELETE_MODE to delete a session (mode) of the current user.
Also to tighten security even more you may run a periodic batch job to check if all logged firefighter users provided ticket numbers. If not, log them out. Check out TH_DELETE_USER to log out another user.
I do realize this is not 100% what you are looking for, but I guess it can be a pretty decent workaround.
BR
Dominik Tylczyński
2018 Jul 13 8:13 AM
Hi Dominik,
thank you very much for your help !
This workaround sounds really good, but i have one problem: The FM TH_DELETE_MODE has only the parameter "mode" and no user in it. So i have no idea what the FM is really doing ???
br Martin
2018 Jul 13 8:32 AM
2018 Jul 13 8:00 AM
For example you could call CL_GUI_TIMER (sample report SAP_TIMER_DEMO) before displaying the popup, so every second, an event could be raised, in the handler method, check if data was entered, if yes exit, if no call again the timer to raise event again, get a list of current user opened nodes and kill every other nodes created by user, Use FM TH_LONG_USR_INFO and TH_DELETE_MODE suggested by Dominik Tylczyński. (of course some fast and furious users may be able to run a transaction in less than 1 second, actually the timer wait up to set interval seconds.)
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |