Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing Internal Data →  Character String and Byte String Processing →  Expressions and Functions for String Processing →  String Functions →  Processing Functions for Character-Like Arguments 

concat_lines_of - Concatenation Function

Other versions: 7.31 | 7.40 | 7.54

Syntax


... concat_lines_of( [table =] itab [sep = sep] ) ...

Effect

This function concatenates all row contents of an internal table itab and returns the result as a character string. itab expects an index table with character-like row type. itab is a functional operand position.

sep can be used to specify a string as a separator to be inserted between rows. sep is a character-like expression position. If sep is not specified, the row contents of the internal table are appended to each other directly. If the row types or the argument sep have a fixed length, then trailing blanks are ignored.

The formal parameter table must be specified explicitly only if sep is also specified.

The return code has the type string.


Note

You can use the concatenation operator && to concatenate elementary character strings.


Example

This function returns "ABAP Objects".

TYPES c80 TYPE c LENGTH 80. 
DATA: itab  TYPE TABLE OF c80, 
      result TYPE string. 

APPEND 'ABAP'    TO itab. 
APPEND 'Objects' TO itab. 

result = concat_lines_of( table = itab sep = ` ` ).