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

MESSAGE in a string

Former Member
0 Likes
2,159

Hi

at the return of a fm I have something like that:

MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

I would like to know if is it possible to store the value of the message that is gonna be on video on a variable.

thanks

gabriele

3 REPLIES 3
Read only

Former Member
0 Likes
1,858

Hi,

Use the addition INTO <variable> to construct the message and store it in a variable.

Regards,

Nick

Read only

Former Member
0 Likes
1,858

Hi,

DATA mtext TYPE string.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

INTO mtext

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

Regards,

Thilotham.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,858

Yes, look at MESSAGE online help by pressing F1 on your source editor or at [MESSAGE|http://help.sap.com/abapdocu/en/ABAPMESSAGE.htm], [MESSAGE - message_options|http://help.sap.com/abapdocu/en/ABAPMESSAGE_OPTIONS.htm], [INTO text |http://help.sap.com/abapdocu/en/ABAPMESSAGE_OPTIONS.htm#!ABAP_ADDITION_3@3@]

Regards,

Raymond