Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with popup window

martin_svik2
Participant
0 Likes
3,149

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

6 REPLIES 6
Read only

DoanManhQuynh
Active Contributor
0 Likes
2,382

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

Read only

martin_svik2
Participant
0 Likes
2,382

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 ?

Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
2,382

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

Read only

0 Likes
2,382

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

Read only

0 Likes
2,382

TH_DELETE_MODE deletes a sessions of the current user. Therefore there is no user name as input parameter. The function imports just the number of the session that you want to delete. You can get that number with TH_LONG_USR_INFO function.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,382

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.)