Application Development and Automation 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: 
Read only

ThUsrInfo - Documentation

Former Member
0 Likes
3,954

Hi,

I have one function ThUsrInfo, how can i know how many and what ids and field combination i can pass.

eg.

call 'ThUsrInfo' id 'OPCODE' field opcode_send_pop_up

id 'CLIENT' field client

id 'USR' field user

id 'MSG' field message

id 'MSG_LEN' field message_len

id 'CUT_BLANKS' field loc_cut_blanks

id 'TAB' field usr_tabl-sys

id 'TID' field tid.

There is no documentation available neither on net nor in SAP.

Plz help in this matter.

Regards,

Priya

1 ACCEPTED SOLUTION
Read only

gaursri
Active Contributor
0 Likes
1,768

Hi Priya,

The Ids we can get from the tranaction SM04.In this transaction it will show the logon ids which you can use here in this function module.These ids is to be created then released when it is created or released then only it will be appearing in sm04.Hope it resolves your query.Have a great day ahead.

3 REPLIES 3
Read only

GauthamV
Active Contributor
0 Likes
1,768

You can use like this.



PARAMETERS: P_CLIENT LIKE SY-MANDT DEFAULT SY-MANDT ,
 P_USER LIKE USR02-BNAME DEFAULT SY-UNAME,
            P_MSG(128) DEFAULT 'Type your message...' LOWER CASE.
        DATA: OPCODE_SEND_POP_UP(1) TYPE X VALUE 31,
              MSG_LENGTH LIKE SY-INDEX,
              LOC_CUT_BLANKS TYPE X VALUE 1.

        DESCRIBE FIELD P_MSG LENGTH MSG_LENGTH IN CHARACTER MODE.
        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:/ 'Sent to the user ', P_USER, ' successfully.'.
    ELSE.
    WRITE:/ 'User is not active at present, try later!'.
  ENDIF.

Read only

Former Member
0 Likes
1,768

Hi,

This is fine, i know this, but can i get documentation as to how many ids and fields i can pass.

Actually my requrirement is that i want to send message to particular terminal. Is there any field like TERMINAL.

Regards,

Priya

Read only

gaursri
Active Contributor
0 Likes
1,769

Hi Priya,

The Ids we can get from the tranaction SM04.In this transaction it will show the logon ids which you can use here in this function module.These ids is to be created then released when it is created or released then only it will be appearing in sm04.Hope it resolves your query.Have a great day ahead.