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

error message

Former Member
0 Likes
333

hello tout le monde,

can someone tell me how intruduce dynamic values with this kind of message.

Message 'Your Message Goes Here' TYPE 'W' .

thank you for your time.

1 REPLY 1
Read only

Former Member
0 Likes
314

You can do this way.. using the Format message function.

DATA: msgid TYPE sy-msgid,
      msgno TYPE sy-msgno,
      msety TYPE sy-msgty,
      msgv1 TYPE sy-msgv1,
      text(100).

msgid = 'ZZ'.
msgno = '000'.
msgv1 = 'Your Message Goes Here' .
CALL FUNCTION 'FORMAT_MESSAGE'
 EXPORTING
   id              = msgid
   lang            = sy-langu
   no              = msgno
   v1              = msgv1
*   V2              = SY-MSGV2
*   V3              = SY-MSGV3
*   V4              = SY-MSGV4
 IMPORTING
   msg             = text
 EXCEPTIONS
   not_found       = 1
   OTHERS          = 2
          .
IF sy-subrc EQ 0.
  MESSAGE  text TYPE 'W' .
ENDIF.