cancel
Showing results for 
Search instead for 
Did you mean: 

How to display data in the form of step by step

Former Member
0 Kudos

Hi all,

I want to display the long text type string which is in the table in the form of line1##line2##line##line4## .

I want to display it in the form of

line1

line2

line3

line4.

i.e for every next of '##', I want to display in the next line.

Please help me in this

thanks in advance..

Venkat..

Accepted Solutions (1)

Accepted Solutions (1)

romanweise
Active Contributor
0 Kudos

Hello,

I think the easiest way is to just define a table with line type of a long charachter field e.g. chart255 or string. Then get the lines by splitting the string into a table then loop about the table.


DATA:
  lv_string TYPE                   string,

  lv_line   TYPE                   string,
  lt_lines  TYPE STANDARD TABLE OF string.

lv_string = 'line1##line2##line3##line4'.

SPLIT lv_string AT '##' INTO TABLE lt_lines.

LOOP AT lt_lines INTO lv_line.
  WRITE / lv_line.
ENDLOOP.

Best Regards

Roman

Former Member
0 Kudos

answered

Answers (0)