2006 Aug 29 10:44 PM
Hi All,
I have a requirement to concatenate the contents of fields and some text into a character string.
Concatenate (FIELD_A) ' AND ' (FIELD_B) ' ON '
into text_from.If Field_A = '1000'. and
Field_B = '2000'.
then the contents of text_from should be
' 1000 AND 2000 ON 'Please let me know how to achieve this.
Thanks again,
Jr.
2006 Aug 29 10:47 PM
Use the below code...
If Field_A = '1000'. and
Field_B = '2000'.
<b>CONCATENATE '1000' 'AND' '2000' 'ON' INTO TEXT_FROM SEPARATED BY SPACE.</b>
endif.
Cheers,
Abdul Hakim
2006 Aug 29 10:47 PM
Use the below code...
If Field_A = '1000'. and
Field_B = '2000'.
<b>CONCATENATE '1000' 'AND' '2000' 'ON' INTO TEXT_FROM SEPARATED BY SPACE.</b>
endif.
Cheers,
Abdul Hakim
2006 Aug 29 10:47 PM
2006 Aug 29 10:47 PM
DATA: v_tmp type c value ''.
Concatenate v_tmp FIELD_A 'AND' FIELD_B 'ON' v_tmp
into text_from separated by space.
Try this.
2006 Aug 30 12:03 AM
if field_a eq '1000' and
field_b eq '2000'.
text_from = ' 1000 AND 2000 ON'.
else.
concatenate field_a 'AND' field_b 'ON' into text_from separated by space.
endif.
hith
Sunil Achyut
2006 Aug 30 6:36 AM
hi,
it seems to be your requirement is like to concatenate few values with some text.
in such a case you first move those integer values to a character variable and then use CONCATENATE.
data V_char(20) type c.
v_char = v_integer. "your 1000 or 2000 etc..
then use
CONCATENATE V_CHAR1
'AND'
V_CHAR2
'ON'
INTO V_CHAR3 SEPARATED BY SPACE.
regards
srikanth