‎2006 Oct 03 8:24 PM
Hi, How to output field1 C(10) and field1 C(10) into a string field and maintain the lengths of the individual fields?
FIELD1 C(10) is 'ABCD'
FIELD2 C(10) is '0123456789'
MYSTRING should be 'ABCD 0123456789'
I get errors using the write and concatenate doesn't preserve the field lengths.
How to do this?
‎2006 Oct 03 8:29 PM
You must use place holders.
report zrich_0002.
data:
field1(10) type c value 'ABCD',
field2(10) type c value '0123456789'.
data: mystring type string.
translate field1 using ' %'.
translate field2 using ' %'.
concatenate field1 field2 into mystring.
translate mystring using '% '.
write:/ mystring.
Regards,
Rich Heilman
‎2006 Oct 03 8:29 PM
You must use place holders.
report zrich_0002.
data:
field1(10) type c value 'ABCD',
field2(10) type c value '0123456789'.
data: mystring type string.
translate field1 using ' %'.
translate field2 using ' %'.
concatenate field1 field2 into mystring.
translate mystring using '% '.
write:/ mystring.
Regards,
Rich Heilman
‎2006 Oct 03 8:31 PM
Hi,
Use TRANSLATE then
Concatenate FIELD1 FIELD2 into MYSTRING separeted by SPACE.
Regards
Sudheer
‎2006 Oct 04 8:05 AM
Hi kenneth,
use
DATA : MYSTRING(25) TYPE C.
CONCATENATE FIELD1 FIELD2 INTO MYSTRING SEPERATED BY ' '.
Regards,
Ajith
Mark if useful.