Skip to Content
avatar image
Former Member

TEXT_SYMBOL_REPLACE replaces the variables in seperate lines

I have a text symbol with variables as below,

Dear &Namev& &Name1&,

When I use the FM 'TEXT_SYMBOL_REPLACE' to replace the  texts, it's replaced as

Dear 

Archna

Raja

,

The Formatting is lost. How should i overcome this?

I tried even using(C) for the variables. But it doesn't work.

Request your inputs in this regard.

-

Archna

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 22, 2015 at 08:59 AM

    Try calling FORMAT_TEXTLINES FM after TEXT_SYMBOL_REPLACE.

    Sample code

    call function 'FORMAT_TEXTLINES'

      exporting

    *   CURSOR_COLUMN           = 0

    *   CURSOR_LINE             = 0

    *   ENDLINE                 = 99999

        formatwidth             = 128

    *   LINEWIDTH               = 132

    *   STARTLINE               = 1

    *   LANGUAGE                = SY-LANGU

    * IMPORTING

    *   NEW_CURSOR_COLUMN       =

    *   NEW_CURSOR_LINE         =

      tables

        lines                   = ilines. "This internal table is populated by TEXT_SYMBOL_REPLACE . Just pass it as it is

    R

    Add comment
    10|10000 characters needed characters exceeded