Skip to Content
-1

Text symbols: Split line

Sep 29, 2017 at 03:09 PM

103

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Sandra Rossi Sep 29, 2017 at 06:33 PM
0

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'.
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Sandra,

Thanks for your answer. I think that's the way to do it.

Regards,

Luis

1

Or like that?

MESSAGE 'a long first line'(001) &&
        ' a long second line'(002) 
        type 'I' DISPLAY LIKE 'W'.
3
Sandra Rossi Sep 29, 2017 at 03:25 PM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0