Hi Hari
Using offset is the best way to handle this.
data field1(4) type c. data field2(10) type c. data field3(14) type c. field1 = '23'. field2 = '4566789120'. move field1 to field3. move field2 to field3+4. write:/ field3.
Kind Regards
Eswar
concatenate field1 field2 into field3 separated by ' '.
~Suresh
Concatenate field1 field2 into field3 separated by ` `.
Jusr copy paste.
Note that the quotes are not normal ones. The key above the Tab in the key board.
Regards,
Ravi
Hi,
Try this.
data field1(4) type c.
data field2(10) type c.
data field3(14) type c.
field1 = 23.
field2 = 4566789120.
concatenate <b>field1 ' ' field2+0(10) into field3 separated by space.</b>write field3.
Hi Hari,
Try follwing code.
data field1(4) type c.
data field2(10) type c.
data field3(14) type c.
data field4(1) type c.
start-of-selection.
field1 = 23.
field2 = 4566789120.
concatenate field1 field4 field2 into field3 separated by space.
write:/ field3.
-Anu
Hi Krishna,
Concatenating white space can be acheived using ALT+255
<b>
data : white_space(1) value ' '.</b>
here the space that is defaulted should not be created using space key of the keyboard instead use Alt+255(numbers typed from your Numkeys in your keyboard). This will include a white space into the variable white_space which can be concatenated to any string.
Now you can do
<b>concatenate field1 white_space field2 into field3.</b>
Thanks,
Prasath N
Message was edited by: prasath natesan
Here's another method:
data field1(4) type c.
data field2(10) type c.
data field3(14) type c.
data begin of tmp,
field1(4) type c,
field2(10) type c,
end of tmp.
field1 = 23.
field2 = 4566789120.
tmp-field1 = field1.
tmp-field2 = field2.
field3 = tmp.
Regards
Sridhar
Add a comment