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

Convert Error

Former Member
0 Likes
717

Hi,

When i put a NUM variable as a denominator, the system returns error: CONVT_NO_NUMBER CX_SY_CONVERSION_NO_NUMBER.

The value of the variable is 1,100. Should convert the variable prior doing the calculation??

Regards,

Kit

4 REPLIES 4
Read only

Former Member
0 Likes
679

hi Kit,

Have you declared your variable as type N. If then change it to type i or any other number format.

Hope this helps you.

Thanks,

Arun

Read only

Former Member
0 Likes
679

Hi,

For arithmatic opreations system tries to convert all non numeric types to either I F or P type. if conversion fails, error is raised. So it is better to use I F or P type variables for doing arithmatic operations to avoid conversion errors.

Read only

0 Likes
679

Thx for the replies.

Is there any FM can handle the NUM data to P conversion??

Regards,

Kit

Read only

Former Member
0 Likes
679

Hi

do this way...


report ztemp1.
data: b(10) type n,
      d TYPE p DECIMALS 3.

 b = '0000000300'.
 d = b.

write : / b,
         / d.

Or you can convert NUMC to Integer also...


data : numcvar type t052-tag1. " here t052-tag1 is of type NUMC
Data: Var type i.

Move numcvar to var.

Write var. " integer value of NUMC value

Hope it will solve your problem

reward points if useful..

Thanks & Regards

ilesh 24x7