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: 

Type conversion

Former Member
0 Kudos

Hi,

I need to convert a variable dec(11) in a char variable.

write dec_variable to char_variable

and

move dec_variable to char_variable

doesn´t work.

How can I do it??

Yhanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

try this...

data: pd(11) type p decimals 2 value '20.00',

ch(15) type c.

ch = pd.

write: pd, ch.

4 REPLIES 4

matt
Active Contributor
0 Kudos

Write should work. What are the data definitions of dec_variable and char_variable. What results do you get when you try?

matt

Former Member
0 Kudos

hi,

try to move it to string variable

regards,

pavan

Former Member
0 Kudos

try this...

data: pd(11) type p decimals 2 value '20.00',

ch(15) type c.

ch = pd.

write: pd, ch.

Former Member
0 Kudos

Hi

report zrich_0001 .

data:

wa_char_results-mean_value type labst value '123456123.789',

wa_zbdprt_alv-mean_value type char16.

write wa_char_results-mean_value to wa_zbdprt_alv-mean_value .

write:/ wa_zbdprt_alv-mean_value.