Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Display a popup screen in logon screen without create session option

$
0
0

Hi,

 

Below is my requirment is :

"No longer allow Service users to log to SAP"

 

Solution done in system is below:

 

In SAP enhancement SUSR0001 , we have added the below codes,

 

   SELECT SINGLE ustyp  INTO wl_user
      FROM usr02
      WHERE bname EQ sy-uname.

 

IF wl_user EQ 'S'    " Service User

   CALL FUNCTION 'POPUP_TO_INFORM'
    EXPORTING
      titel = text-001   "U
nsuccessful Logon"
      txt1  = text-002   "
service users are restricted to logon to SAP interactively".
ENDIF.

 

But in the above FM, the pop will show the option to 'create session' and if we select create session, its creating the session.

 

Then I tried the FM 'TH_POPUP',

 

CALL FUNCTION 'TH_POPUP'

   EXPORTING

     client               = SY-MANDT

     user                 = sy-uname

     message              = 'Unsuccessful Logon :Logon with obsolete SAP GUI version is not allowed.'

*   MESSAGE_LEN          = 0

*   CUT_BLANKS           = ' '

* EXCEPTIONS

*   USER_NOT_FOUND       = 1

*   OTHERS               = 2.

 

This FM will show the popup message without create session option.

But the issue is, the popup is coming and going within seconds and not waiting for pressing OK button.

 

I tried with error (E) ,Abort(A) message as well. But still I can create the session.

 

Could you please let me know, Is there any other FM, will work as per above? OR any other logic should I add?


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>