Converting multiple rows to one row of an internal table in ABAP

1.7k Views Asked by At

I have an internal table where (for example) five rows have the same entries with the exception of one column which is language dependant. For my ALV output I want all the language entries in one row next to each other.

In my internal table the column is like:

Polish,
english,
swedish

and in my final output I want it like: polish, english, swedish. If I have only one column I know how to do it I think, but I have a whole internal table with ten columns and I need to assign the right language texts to the right names.

1

There are 1 best solutions below

0
On

That's simple I'd guess:

data lv_line type char255.
loop at it_languages into data(ls_languages).
   lv_line  = lv_line && ls_languages-lang.
endloop.

append lv_line to lt_lines.

from here you'd only have to display the table on alv.