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 "Unsuccessful 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?