Is there another way to concatenate instead of using the CONCATENATE keyword?

Yes, you can use String Templates, which were introduced in ABAP 7.02.

An example following:

DATA:
  foo    TYPE string,
  bar    TYPE string,
  foobar TYPE string.

  foo = 'foo'.
  bar = 'bar'.

  foobar = |{ foo } and { bar }|.

You can (starting with ABAP 7.02) use && to concatenate two strings.

Data:
foo    TYPE string,
bar    TYPE string,
foobar TYPE string.

foo = 'foo'.
bar = 'bar'.

foobar = foo && bar.

This also works with character literals:

foobar = 'foo' && 'bar'.

For preserving spaces, use this kind of character literal named "text string literal" which is defined with two grave accents (U+0060):

foobar = foo && ` and ` && bar

Besides the String Expressions mentioned by Eduardo Copat, it is sometimes sensible to use the MESSAGE ... INTO ... statement - especially if the text is supposed to be translated. In some translations, the positions of variables relative to each other have to be swapped, and it is generally much easier to translate the text You cannont combine &1 with &2. than the separate parts You cannot combine and with.

Tags:

Abap