Ansicht
Dokumentation

09536 - User Messages

09536 - User Messages

rdisp/max_wprun_time - Maximum work process run time   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

User Messages

I'll chime in with a program I use regularly to send messages to a user.
Works great, it's simple, and I'm pretty sure I got it from someone on
this fine list. The last bit for program use can be omitted 🙂

Andy
--------------------------------------------------------------------------------\
----

REPORT ZPRIVATE_MESSAGE .
* 09/12/2001 CWC added pgmuse


PARAMETERS:
P_MSG(128) DEFAULT ' ' LOWER CASE,
P_CLIENT LIKE SY-MANDT DEFAULT SY-MANDT,
P_USER LIKE SY-UNAME DEFAULT SY-UNAME.

DATA: PGM LIKE SY-REPID.

DATA: OPCODE_SEND_POP_UP(1) TYPE X VALUE 31,
MSG_LENGTH LIKE SY-INDEX,
LOC_CUT_BLANKS TYPE X VALUE 1.
PERFORM PGM_USE.

DESCRIBE FIELD P_MSG LENGTH MSG_LENGTH.

CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE_SEND_POP_UP
ID 'CLIENT' FIELD P_CLIENT
ID 'USR' FIELD P_USER
ID 'MSG' FIELD P_MSG
ID 'MSG_LEN' FIELD MSG_LENGTH
ID 'CUT_BLANKS' FIELD LOC_CUT_BLANKS.

IF SY-SUBRC = 0.

WRITE:/ 'Message delivered to ', P_USER, 'successfully.'.
ELSE.
WRITE:/ 'User does not exist!'.
ENDIF.
*&---------------------------------------------------------------------*
*& Form PGM_USE
*&---------------------------------------------------------------------*
FORM PGM_USE.
PGM = SY-REPID.
CALL FUNCTION 'Z_PGM_USE'
EXPORTING
CODE = 'PP'
PRGM_NAME = PGM
DATE = SY-DATUM
EXCEPTIONS
OTHERS = 1.

ENDFORM. " PGM_USE





"Sugg, Chris" <cgcsuggZnmhg.com>
03/04/2003 02:34 PM
Please respond to SAP on System i

To: "'DoNotReply@consolut.eu'"
<DoNotReply@consolut.eu>
cc:
Subject: RE: User Messages


Here is an *untested* ABAP program that I got from somebody. I have never
compiled or tested it, only created the ABAP program in DEV.

*=============================================================
* This program will send a system message to a specific user
* and also has the ability to lock the user id also. User
* must have the SAP_ALL profile to be able to use program.
*
* Created By: 02-NOV-2001
*=============================================================
* Modification History:
*=============================================================
*
*=============================================================

REPORT Z_SNDLCK_MSG .


TABLES: USR02.
DATA: I_USR02 LIKE USR02 OCCURS 0 WITH HEADER LINE.

PARAMETERS: MESSAGE(128) TYPE C OBLIGATORY LOWER CASE.
SELECTION-SCREEN: SKIP.
PARAMETERS: INFORM RADIOBUTTON GROUP RADI.
PARAMETERS: LOGOFF RADIOBUTTON GROUP RADI.
SELECTION-SCREEN: SKIP.
SELECT-OPTIONS: USERNAME FOR USR02-BNAME OBLIGATORY.

AUTHORITY-CHECK OBJECT 'S_ADMI_FCD'
ID 'S_ADMI_FCD' FIELD 'PADM'.

IF SY-SUBRC NE 0.
MESSAGE E000(38) WITH 'You are not authorized for process admin'.
ENDIF.

SELECT * FROM USR02 INTO TABLE I_USR02
WHERE USTYP = 'A'
AND BNAME IN USERNAME.

WRITE: / SY-SYSID NO-GAP, SY-MANDT.
WRITE: / SY-DATUM MM/DD/YYYY, SY-UZEIT.
SKIP.
IF INFORM = 'X'.
WRITE: / 'Message:', MESSAGE.
SKIP.
WRITE: / 'Contacted Users:'.
SKIP.
ELSE.
WRITE: / 'Automatic Logoff Users:'.
SKIP.
ENDIF.
LOOP AT I_USR02.
IF INFORM = 'X'.
PERFORM INFORM_USER.
ELSE.
PERFORM SHOW_USER_TO_THE_DOOR.
ENDIF.
ENDLOOP.

FORM SHOW_USER_TO_THE_DOOR.
CALL FUNCTION 'TH_POPUP'
EXPORTING
CLIENT = SY-MANDT
USER = I_USR02-BNAME
MESSAGE = 'Automatic Logoff Initiated'
CUT_BLANKS = 'X'
EXCEPTIONS
USER_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE: /15 I_USR02-BNAME.
CALL FUNCTION 'TH_DELETE_USER'
EXPORTING
USER = I_USR02-BNAME
CLIENT = SY-MANDT
EXCEPTIONS
AUTHORITY_ERROR = 1
OTHERS = 2.
ENDIF.
ENDFORM.

FORM INFORM_USER.
CALL FUNCTION 'TH_POPUP'
EXPORTING
CLIENT = SY-MANDT
USER = I_USR02-BNAME
MESSAGE = MESSAGE
CUT_BLANKS = 'X'
EXCEPTIONS
USER_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE: /15 I_USR02-BNAME.
ENDIF.

Good luck,
Chris

-----Original Message-----
From: geraldjh2003 <geraldjhZaol.com> [mailto:geraldjhZaol.com]
Sent: Tuesday, March 04, 2003 3:19 PM
To: DoNotReply@consolut.eu
Subject: User Messages


Transaction SM02 is a way to send system messages but is there a way
to send a user message in the same fashion? The SAP Library lists the
following in the index but doesn't give a transaction.

Graphical User Interface (BC-FES-GUI)
Short message to other R/3 System users.

You can send a user message to any number of users. It is displayed
in a window that is displayed once.




Have a look to our homepage at: http://www.consolut.net
DoNotReply@consolut.eu

Your use of consolut is subject to http://www.consolut.net



Have a look to our homepage at: http://www.consolut.net
DoNotReply@consolut.eu

Your use of consolut is subject to http://www.consolut.net





[Non-text portions of this message have been removed]


Durban Tours - Südafrika Safari

Addresses (Business Address Services)   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 6792 Date: 20240423 Time: 202336     sap01-206 ( 2 ms )