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

Problem in Concatenate Statement

Former Member
0 Likes
806

hello Friends,

I have to concatenate Four variables A B C and D.In this four variables three of them are Characters.The last one is currency field.I am not able to concatenate this field.for this I declared one variable in character fomat and i moved this currency variable into this character variable.but i am not able to get that variable.

Please give me solution for my problem.

Thanks in advance.

Regards,

Ashok.

7 REPLIES 7
Read only

Former Member
0 Likes
767

CONCATENATE is only at FIELD level for CHAR type fields and not records.

ur approch is write.

go to debugger mode and try to check what is the problem. i think there is any silly mistake....gud luck.

Read only

Former Member
0 Likes
767

Hi Ashok

Please check this example:

data: fld1(10) type c value 'ABC',
      fld2(10) type c value 'DEF',
      fld3 type wrbtr value '123.45'.

data: str type string.

move fld3 to str.
concatenate fld1 fld2 str into str separated by space.

write:/ str.

Kind Regards

Eswar

Read only

Former Member
0 Likes
767

hi ashok,

concatenate statement is to merge the charecter fields...there is nothing with regards to the type of the field...i do think there must be some prob while using the currrency field...hope u can get it in watch mode..

Read only

Former Member
0 Likes
767

hi ashok,

check the following eg code.

data : var1 type c value 'h',

var2 type c value 'i',

var3 like vbrk-netwr ,

var5(20) type c,

var4(30) type c.

var3 = '20.0'.

var5 = var3.

concatenate var1 var2 var5 into var4.

write var4.

try using above code its working.

regards,

Ravi Kumar Gunda.

Read only

Former Member
0 Likes
767

hi

good

you cant concatenate character with curreency fiels, so what you have done is correct but after storing that currencly field in a character datatype you can do the concatenate .check the length of the character field in which you r storing the value and try again.

thanks

mrutyun^

Read only

Former Member
0 Likes
767

Hi

The currency value has to move one string initially and concatenate other values.

It will work

Read only

Former Member
0 Likes
767

hi ashok,

I think this may overcome your problem. If you need you can directly initiate the values or else you can give like this.

parameters: str1 type field,

str2 type field ,

str3 type field .

data: str type field.

concatenate str1 str2 str3 into str separated by space.

write:/ str.

with regards,

magesh.