cancel
Showing results for 
Search instead for 
Did you mean: 

Concatenation of 3 or more strings

Koei
Discoverer
0 Kudos
238

Concatenation of 3 or more strings

The CONCAT function can be used to concatenate two strings, but to concatenate three or more strings, don't we have to concatenate them one by one?

Please tell me an easier way to do this.

William_Yu
Product and Topic Expert
Product and Topic Expert
0 Kudos
Have you tried to nest the CONCAT syntax?
yashoratna
Active Participant
0 Kudos

We have new ways to do in new abap syntax. You can try as per below.

lv_all_string = 'Test1' && 'Test2' && 'Test3'.     

OR

lv_text1 = 'Test1'.

lv_text2 = 'Test2'.

lv_text3 = 'Test2'.

lv_all_string = |{ lv_text1 }{ lv_text2 }{ lv_text3 }|.

lv_all_string will return as value 'Test1Test2Test3'.

View Entire Topic
chmbilal
Participant
0 Kudos

CONCAT(CONCAT([FirstName], [MiddleName]), [LastName])