11-17-2007 10:26 AM
hello all,
I want to Concatenate a , 15 spaces, 'b , 14 spaces , c into d.
that concatenate statement is in loop and that 15,14 spaces are flexible .
Please help me .How can I do this.
11-17-2007 10:34 AM
Same like i gave in another thread.
Constants: gc_space1(14) type c value ' ',
gc_space2(15) type c value ' '.
Data: d(50) type c.
Concatenate 'a' gc_space2 'b' gc_space1 'c' into d.
write d.
Regards,
Satish
11-17-2007 10:35 AM
data:sp1(15),result(50).
concatenate 'A' 'B' 'C' into result separated by sp1.
write result.
im not aware how to merge with flexible space count.
11-17-2007 11:31 AM
Hi Megha,
try this code.. it's working..
DATA : str1 TYPE string,
d TYPE string.
DATA : len1 TYPE i,
len2 TYPE i.
DATA : str TYPE char40 VALUE ' '.
len1 = 15. "As you said 15 & 14 are variables here you can assign any value
len2 = 14.
CONCATENATE 'a' 'b' INTO str1 SEPARATED BY str+0(len1).
CONCATENATE str1 'c' INTO d SEPARATED BY str+0(len2).
WRITE 😕 d.