‎2009 Jun 21 10:28 AM
Hallo I want to insert spaces in a varribable value.
I have tries with
CONCATENATE ' ' variable to result. But it dont function. Can somebody tell me how can I do it.
regards
rana
‎2009 Jun 21 12:43 PM
Hi,
try this,
CONCATENATE ' ' f1 f2 INTO f3 SEPARETED BY SPACEhope it'll help.
Regards,
Sneha.
‎2009 Jun 21 10:38 AM
hi,
if u r adding spaces at the end then it will not be reflected in the output u need to add with some other values followed by sapces ..plz find below the piece of code...
DATA: a(10) type c.
a = 'Abap'.
DATA: b(4) type c.
b = 'Code'.
DATA c(12) type c.
CONCATENATE a b INTO c SEPERATED BY SPACE.
Thanks & Regards
Ashu Singh
‎2009 Jun 21 11:55 AM
Hi,
Use SEPARATED BY SPACE addition with CONCATENATE statement.
Regards,
Lakshman.
‎2009 Jun 21 12:39 PM
Hi,
If you want to concatenate just a space to a data object (variable), you have to use string literals ` ` (enclosed in back quotes) instead of text literals ' ' (enclosed in normal quotes). This can be done as follows:
data my_var type string value 'Some string'.
concatenate my_var ` ` into my_var. "not ' '
In contrast to text literals, string literas don't suppress space at the end.
Regards
Marcin
‎2009 Jun 21 12:43 PM
Hi,
try this,
CONCATENATE ' ' f1 f2 INTO f3 SEPARETED BY SPACEhope it'll help.
Regards,
Sneha.