Home > ABAP, Enhancement > Pop up messages when user logons SAP system

Pop up messages when user logons SAP system

February 4th, 2010 Leave a comment Go to comments

Sometimes we need to configure the sap server to pop up a message to the users when they logon to the system. Generally, there are two methods to meet this requirement.

  1. Go to transaction SM02 – System Messages. You can maintain the system message here. If user refreshes or open the window, the system message will be displayed.
  2. But business wants only part of user will receive such messages when user logon, above method doesn’t work very well. Some enhancement needs to be done. Use customer exit ‘SUSR0001’. Below are the detail steps.
  • Transaction SMOD, enter exit name ‘SUSR0001’.

  • Double click function module exit ‘EXIT_SAPLSUSF_001’. This exit will be called after user logon to the system.
  • Create include ‘ZXUSRU01’ and add your custom code in it.
tables: /virsa/zvirffids.
Data: str like SM04DIC-POPUPMSG.
select single * from /virsa/zvirffids where zvirffid = sy-uname.
if sy-subrc = 0.
  concatenate 'User' sy-uname 'not Authorized to Logon directly.' into
     str separated by space.
  CALL FUNCTION 'TH_POPUP'
    EXPORTING
      CLIENT               = sy-mandt
      USER                 = sy-uname
      MESSAGE              = str
*     MESSAGE_LEN          = 0
*     CUT_BLANKS           = ' '
    EXCEPTIONS
      USER_NOT_FOUND       = 1
      OTHERS               = 2.
 
  CALL FUNCTION 'RZL_SLEEP'
    EXPORTING
      SECONDS        = 2
    EXCEPTIONS
      ARGUMENT_ERROR = 1
      OTHERS         = 2.
*     message i605(/virsa/vfat) with sy-uname.
  call 'SYST_LOGOFF'.
endif.
  1. frt
    April 6th, 2011 at 17:50 | #1

    hi i used codes but before it i delete first two or 3 line. and nobody can enter crm test

  1. No trackbacks yet.