‎2009 Jul 10 11:24 AM
Hi,
I m trying to print a varibale after concatenate char type with integer type variable. so plz help me what is exact syntax for concatenation of two type of varibale. ie. char type and Integer type..
Mukul
‎2009 Jul 10 11:27 AM
Hi,
Cancatenation is only possible for data typeswith C, N , D, T and STRING. You can not concatenate char and integer variables.
What you can do is first pass integer value into one char variable and concatenate that with another char variable.
Thanks
Venkat.O
‎2009 Jul 10 11:28 AM
HI Mukulkumar ,
try to move that integer valu to the string. and then concatenate.
because concate works for Char and string fileds
for more press F1 on Concatenate.
Thanks
‎2009 Jul 10 11:28 AM
For concatenation u need all variable as of type C, N, D, T .
So it would be better befor concatenation, u move the integer variable to new char variable.
Then concatenate both.
i.e
Data: var1 type i,
var2 type c.
data: var3 type c.
data: w_text(10).
var3 = var1.
concatenate var3 var2 into w_text separated by space.
Regards
Srimanta
‎2009 Jul 10 11:32 AM
Hi,
Move integer to N type variable.
Example:
Data: Int type I,
ch(10),
temp type N, <---- Increment the lenght if you have number with more than 1 position
final type string.
Move int to temp.
concatenate ch temp into final.
Angelo.
‎2009 Jul 10 11:35 AM
Hi,
Concatenation is a string or character operation and cannot not be performed with a integer as such. The integer value can be moved to a character variable and the concatenation can be performed.
‎2009 Jul 10 11:41 AM
HI ,
Please search SDN and read HELP documnets as well ...Press F1 on CONCATENATE ....
i hope this helps..
Thanks
‎2009 Jul 10 11:54 AM
hi Mukul,
you can move the data from interger type to char type and then concatenate...
here is the eg....
data: data1 type i,
copydata1(10) type c,
data2(10) type c,
result type string.
Data1 = 32000.
copydata1 = data1.
data2 = 'amount'.
concatenate data2 copydata1 into result.
write:/ result.
Regards
Ashu SIngh
‎2009 Jul 10 8:19 PM
check this
data:var1 type i value 25.
data:var2(3) type c.
data:output(255) type c.
write var1 to output.
concatenate output var2 into output.
write output.