Application Development 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: 

System message to selected user

Former Member
0 Kudos

Hi,

I need to send a popup window in a background to selected user(s). It looks that FM TH_POPUP does not work.

Is a possibility to work it around ?

Is it possible to send a system message not to all users but to only selected users ?

Thank you.

Marian

2 REPLIES 2

Former Member
0 Kudos

Hi,


TABLES: KNA1.

* data for send function
DATA DOC_DATA  LIKE SODOCCHGI1.
DATA OBJECT_ID LIKE SOODK.
DATA OBJCONT   LIKE SOLI OCCURS 10 WITH HEADER LINE.
DATA RECEIVER  LIKE SOMLRECI1 OCCURS 1 WITH HEADER LINE.


* insert receiver (sap name)
  REFRESH RECEIVER.
  CLEAR RECEIVER.
  MOVE: SY-UNAME TO RECEIVER-RECEIVER,
        'X'      TO RECEIVER-EXPRESS,
        'B'      TO RECEIVER-REC_TYPE.
  APPEND RECEIVER.

* insert mail description
  WRITE 'Sending a mail through abap'
                 TO DOC_DATA-OBJ_DESCR.

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
     EXPORTING
          DOCUMENT_DATA              = DOC_DATA
     IMPORTING
          NEW_OBJECT_ID              = OBJECT_ID
     TABLES
          OBJECT_CONTENT             = OBJCONT
          RECEIVERS                  = RECEIVER
     EXCEPTIONS
          TOO_MANY_RECEIVERS         = 1
          DOCUMENT_NOT_SENT          = 2
          DOCUMENT_TYPE_NOT_EXIST    = 3
          OPERATION_NO_AUTHORIZATION = 4
          PARAMETER_ERROR            = 5
          X_ERROR                    = 6
          ENQUEUE_ERROR              = 7
          OTHERS                     = 8.

Adibo

ThomasZloch
Active Contributor
0 Kudos

Why does TH_POPUP not work? I have used it in a background process, if the user is logged on, he will get that message. For several users, you can call it inside a loop.

Thomas