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

Converting Char to Quantity field

Former Member
0 Likes
9,162

Hi

I want to convert the Char field calue to the Quantity.

Please let me know how to do it.

Thanks

Kumar

Hi

I want to convert the Char field calue to the Quantity.

Please let me know how to do it.

Thanks

Kumar

3 REPLIES 3
Read only

Former Member
0 Likes
3,688

hi

data: V_char(15).

data: v_menge type menge_d.

V_char = '11'.

v_menge = V_char.

write: / v_menge.

Thanks,

Naren

Read only

0 Likes
3,688

First verify that the field you want to convert is a number. Try using the following function:

data: v_char_field(100),

v_qty_num type rl03t-pickm.

call function 'MOVE_CHAR_TO_NUM'

exporting

chr = v_char_field

importing

num = v_qty_num

exceptions

convt_no_number = 1

convt_overflow = 2.

if sy-subrc <> 0.

"write/throw error message

endif.

Read only

Former Member
0 Likes
3,688

Use function module MOVE_CHAR_TO_NUM.