09-29-2017 4:09 PM
Hi all,
If a message line is long, sometimes it looks better in two or more lines. I know how to do it when using literals in MESSAGE. Is there any way to do it using text symbols?
Thanks in advance,
Luis
09-29-2017 7:33 PM
If I understand well your question. Currently, you do:
DATA: msg_text type string.
msg_text = 'a long first line' &
' a long second line'.
MESSAGE msg_text type 'I' DISPLAY LIKE 'W'.
You want to use text symbols instead of the text literals, so you cannot use the literal operator &, but you may use the string operator &&:
DATA: msg_text type string.
msg_text = 'a long first line'(001) &&
' a long second line'(002).
MESSAGE msg_text type 'I' DISPLAY LIKE 'W'.
09-29-2017 4:25 PM
Differently said, is your question "split line" similar to "word wrapping" ? If so, I don't understand why your solution for MESSAGE would be different with a text symbol.
Or is your question about replacing "placeholders" in a text symbol ? (not related to "split line" but maybe you used the wrong term) If so, using the ABAP statement REPLACE is very easy.
09-29-2017 4:51 PM
Sandra,
First, my apologies if the question was not stated clearly, as english is not my first language.
Let me show you a small example. If I write:
DATA: msg_text type string.
msg_text = 'a long first line' &
' a long second line'.
MESSAGE msg_text type 'I' DISPLAY LIKE 'W'.
I get my message in two lines. How can I replicate that using text symbols?
Regards,
Luis
09-29-2017 7:33 PM
If I understand well your question. Currently, you do:
DATA: msg_text type string.
msg_text = 'a long first line' &
' a long second line'.
MESSAGE msg_text type 'I' DISPLAY LIKE 'W'.
You want to use text symbols instead of the text literals, so you cannot use the literal operator &, but you may use the string operator &&:
DATA: msg_text type string.
msg_text = 'a long first line'(001) &&
' a long second line'(002).
MESSAGE msg_text type 'I' DISPLAY LIKE 'W'.
09-29-2017 9:31 PM
Sandra,
Thanks for your answer. I think that's the way to do it.
Regards,
Luis
10-01-2017 4:51 PM
Or like that?
MESSAGE 'a long first line'(001) &&
' a long second line'(002)
type 'I' DISPLAY LIKE 'W'.