‎2007 Feb 06 5:29 AM
Hi Folks,
How to put space b/w the string.
I mean i have 'string120'.But i have to display this string as like 'str ing 120'.
the total string is stored in single variable only.
Is it possible ....if yes..How.
Thanks in advance.
Subbu.
‎2007 Feb 06 5:32 AM
‎2007 Feb 06 5:32 AM
‎2007 Feb 06 5:49 AM
data : str1(9) type c value 'String120',
d1(3),
d2(3),
d3(3),
d_show(11).
d1 = str1(3).
d2 = str1+3(3).
d3 = str1+6(3).
concatenate d1 d2 d3 into d_show separated by space.
write : / d_show.
‎2007 Feb 06 6:23 AM
Use the 'SEPARATED BY SPACE' in the concatenate statement.
Regards,
Naresh
‎2007 Feb 06 5:34 AM
Hi,
Do you want to give space after every 3 characters??
Thanks,
Naren
‎2007 Feb 06 5:38 AM
data :v(10) type c value 'String 120'.
v1(3),
v2(3),
v3(3),
v_result(11).
v1 = v(3).
v2 = v+3(3).
v3 = v+7(3).
concatenate v1 v2 v3 into v_result separated by space.
write : / v_result.
regards
shiba dutta
‎2007 Feb 06 5:57 AM
Hi,
Try this
DATA: string(10) TYPE c VALUE 'string120',
string1(2) TYPE c VALUE 'ri',
string2(3) TYPE c VALUE 'r i'.
REPLACE string1 WITH string2 INTO string.
Write string.<b>Output: str ing120</b>
‎2007 Feb 06 1:15 PM
Hi Subramanyam,,
REPORT ZTEST_CONCATENATE.
data: var1(9),
var2(12).
var1 = '123456963'.
concatenate var1(3) var13(3) var16(3) into var2 separated by SPACE.
WRITE:/ VAR2.