Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Space B/w string

Former Member
0 Likes
753

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
726

hi

check the SPLIT command.

Regards

Subramanian

7 REPLIES 7
Read only

Former Member
0 Likes
727

hi

check the SPLIT command.

Regards

Subramanian

Read only

0 Likes
726

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.

Read only

0 Likes
726

Use the 'SEPARATED BY SPACE' in the concatenate statement.

Regards,

Naresh

Read only

Former Member
0 Likes
726

Hi,

Do you want to give space after every 3 characters??

Thanks,

Naren

Read only

Former Member
0 Likes
726

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

Read only

Former Member
0 Likes
726

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>

Read only

Former Member
0 Likes
726

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.