Skip to Content
0
Former Member
Oct 12, 2006 at 01:16 PM

a qustion of concatenate some variant into string

100 Views

hi,all

as you know that the method concatenate will remove leading and trailing blanks in the Variant.but I am facing one problem while concatenating some variants.source code as below:

data:lv_a type c length 15,

lv_b type c length 20,

lv_c type c length 20,

lv_string type string.

lv_a = 'abc '."(after abc,there are some blanks,blanks qty = 15-strlen( lv_a ))

lv_b = 'def '."(after def there are some blanks,blanks qty = 20- strlen( lv_b ))

lv_c = 'ghi '."(after ghi there are some blanks,blanks qty = 20-strlen( lv_c ))

concatenate lv_a lv_b lv_c into lv_string.

write:lv_string.

the result will be:'abcdefghi'.

but in fact,i need the result will be:

'abc def ghi '(don't remove the blanks of each variants)

what should i do?thanks for all your hints or support

Message was edited by: sam feng