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: 

CONVT_NO_NUMBER - Runtime error

Former Member
0 Kudos

Hello Experts,

I am modifying an SAP standard script in which I called a subroutine pool program.

To the program, I am passing an amount value to perform some calculations. When I try to execute the form, I got a runtime error saying as below.

Runtime Errors         CONVT_NO_NUMBER

Unable to interpret " 249,900.00-" as a number.

The value passed is from the table RF140-WRSHB.

Any inputs on how to resolve this issue will be highly appreciated.

Thanks.

Sandy

7 REPLIES 7

Former Member
0 Kudos

hi Sandeep,

Try convert variable into a compatible type using write to another variable for example. Maybe the programs needs to receive this data on external format (or if you send it with external format, a conversion into internal format)

best regards!

0 Kudos

Hi Carla,

Thanks for your reply!

I did not understand your response. Could you please explain more clearly?

The value I am passing to the program is an currency field (RF140-WRSHB) with 2 decimal places.

In the program I have declared a field as below. The below will be used for calculation.

DATA:  LV_WRSHB TYPE RF140-WRSHB.

   READ TABLE Z_USING WITH KEY NAME = 'RF140-WRSHB'.

   IF SY-SUBRC EQ 0.

     MOVE Z_USING-VALUE TO LV_WRSHB.

   ENDIF.


I am getting an error at the above place when I move the value to LV_WRSHB.


Any other inputs?


Thanks!

0 Kudos

Hi Sandeep, can you show me the Z_USING table definition? , there is something wrong in

READ TABLE Z_USING WITH KEY NAME = 'RF140-WRSHB'.

are you looking for a string or a currency value?.


Thank you

0 Kudos

Based on the messge you got "Unable to interpret " 249,900.00-" as a number" I'd suggest you need to change your logic to be more like this i.e. cater for a negative in the character field (I've not got a SAP system on hand to syntax check this with so it might need a mod):

data:
  lv_wrshb       type rf140-wrshb.

  read table z_using
    with key name = 'RF140-WRSHB'.

  if sy-subrc is initial.

    if z_using-value cs '-'.               "then it's a negative in the character field
      translate z_using-value using '- '.  "so remove the minus sign at the end
      move z_using-value to lv_wrshb.      "now do the move
      lv_wrshb = 0 - lv_wrshb.             "make your currency field negative

    else.
      move z_using-value to lv_wrshb.
    endif.

  endif.


Jonathan

0 Kudos

Hello Jonathan,

Thanks for your reply.

Your logic helped me understand why I got the error. Actually it is because of the ',' (Comma) sign why such error is occurred.

So I replaced the Comma sign with spaces and condensed the gaps.

Thanks for your help!

Sandy.

0 Kudos

Sandeep,

After your changes,did you get to see how this value is getting updated finally in the table ?

K.Kiran.

0 Kudos

Hi Kiran,

After calculations, I am sending back the value to display on the SAPScript form. I am not doing any updates.

Thanks!

Sandy