Application Development 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: 

How to convert DEC

former_member611006
Active Participant
0 Kudos

Hi experts,

I want to use the "concatenate" function but it doesn't work with data with type DEC.

How can I convert DEC data (to CHAR for example).

Thanks for support.

Regards,

David

Edited by: David Cerati on Jan 18, 2008 7:32 AM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi David

Move the decimal value to a temporary character variable and then use for concatenation.

I hope below example can help you understand.


data: l_float(15) type p decimals 2 value '123.34',
      l_string type string.

move l_float to l_string.

write:/ l_string.

concatenate 'Value:' l_string into l_string separated by space.

write:/ l_string.

Kind Regards

Eswar

1 REPLY 1

Former Member
0 Kudos

Hi David

Move the decimal value to a temporary character variable and then use for concatenation.

I hope below example can help you understand.


data: l_float(15) type p decimals 2 value '123.34',
      l_string type string.

move l_float to l_string.

write:/ l_string.

concatenate 'Value:' l_string into l_string separated by space.

write:/ l_string.

Kind Regards

Eswar