cancel
Showing results for 
Search instead for 
Did you mean: 

Why concatenate statement suppressing spaces !!

Former Member
0 Kudos

<i>Hello Friends,

I like give some spaces in a concatenate statement, but it is suppresing the spaces.

for ex: <b>concatenate 'sundar' ' ' 'g' into name</b>.

but the name contains <b>'sundarg'</b> only.

Thank you for your valuable time.

Senthil</i>

Accepted Solutions (1)

Accepted Solutions (1)

suresh_datti
Active Contributor
0 Kudos

Hi Snethil,

change it as follows..

concatenate 'sundar' 'g' into name

separated by space.

Regards

Suresh Datti

Answers (3)

Answers (3)

Former Member
0 Kudos

hi senthil

<b>

Syntax:</b>

CONCATENATE dobj1 dobj2 ... INTO result

<b> [SEPARATED BY sep].

Example:</b>

DATA: t1(10) TYPE c VALUE 'We',

t2(10) TYPE c VALUE 'have',

t3(10) TYPE c VALUE 'all',

t4(10) TYPE c VALUE 'the',

t5(10) TYPE c VALUE 'time',

t6(10) TYPE c VALUE 'in',

t7(10) TYPE c VALUE 'the',

t8(10) TYPE c VALUE 'world',

result TYPE string.

CONCATENATE t1 t2 t3 t4 t5 t6 t7 t8

INTO result.

...

CONCATENATE t1 t2 t3 t4 t5 t6 t7 t8

INTO result SEPARATED BY space.

<b>output:</b>

We have all the time in the world

Former Member
0 Kudos

hi, please pay attention to some content from sap Help on CONCATENATE.

<b>

Note that trailing spaces in source fields with type C are ignored (since they cannot be distinguished from "padding" characters). In C strings, on the other hand, they are considered. All fields fi (1 <= i <= n) are used in the length STRLEN( fi ).

</b>

thanks

Former Member
0 Kudos

concatenate 'sundar' 'g' into name separated by space.