ABAP Strings Concatenating strings


String and char-like variables can be concatenated using ABAP CONCATENATE command. An extra variable for storing the results is required.


CONCATENATE var1 var2 var3 INTO result.
"result now contains the values of var1, var2 & var3 stringed together without spaces


Newer versions of ABAP offer a very short variant of concatenation using && (Chaining operator).

DATA(lw_result) = `Sum: ` && lw_sum.

Attention! It's worth noticing, that using temporary results in combination with the Chaining operator inside of loops can lead to massive performance problems due to growing copy instructions (read more about it here).