7 Replies Latest reply: Jan 8, 2014 3:36 PM by Sandeep C RSS

CONVT_NO_NUMBER - Runtime error

Sandeep C
Currently Being Moderated

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

  • Re: CONVT_NO_NUMBER - Runtime error
    Carla Vita
    Currently Being Moderated

    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!

    • Re: CONVT_NO_NUMBER - Runtime error
      Sandeep C
      Currently Being Moderated

      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!

      • Re: CONVT_NO_NUMBER - Runtime error
        Alejandro Alvarez
        Currently Being Moderated

        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

      • Re: CONVT_NO_NUMBER - Runtime error
        Jonathan Coleman
        Currently Being Moderated

        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

Actions