Skip to Content
-1

Text symbols: Split line

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 29, 2017 at 06: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'.
    Add comment
    10|10000 characters needed characters exceeded

  • Sep 29, 2017 at 03: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.

    Add comment
    10|10000 characters needed 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