Application Development 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: 

TEXT_SYMBOL_REPLACE replaces the variables in seperate lines

Former Member
0 Kudos

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

1 REPLY 1

Former Member
0 Kudos

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