<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Solve Runtime errors 'CX_SY_CONVERSION_NO_NUMBER' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342936#M516610</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I test a subroutine that included in SAPScript,a runtime error occured.Below is the error message.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------" /&gt;&lt;P&gt;Unable to interpret " XXXX.XX " as a number.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------" /&gt;&lt;P&gt;Error Analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; An exception occurred that is explained in detail below.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The exception, which is assigned to class 'CX_SY_CONVERSION_NO_NUMBER', was not&lt;/P&gt;&lt;P&gt;  caught in&lt;/P&gt;&lt;P&gt; procedure "SUB_DETAILS" "(FORM)", nor was it propagated by a RAISING clause. Since the caller of the procedure could not have anticipated that the&lt;/P&gt;&lt;P&gt; exception would occur, the current program is terminated.The reason for the exception is:&lt;/P&gt;&lt;P&gt;The program attempted to interpret the value " XXXX.XX " as a number, but&lt;/P&gt;&lt;P&gt; since the value contravenes the rules for correct number formats,&lt;/P&gt;&lt;P&gt; this was not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: GV_AMOUNT TYPE KWBTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE IN_PAR WITH KEY NAME =  'FEBSCA-KWBTR'.&lt;/P&gt;&lt;P&gt; PACK IN_PAR-VALUE TO GV_AMOUNT.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; GV_AMOUNT = IN_PAR-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i solve this ? Big help needed. Appreciated. Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shehryar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2007 06:12:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-14T06:12:27Z</dc:date>
    <item>
      <title>Solve Runtime errors 'CX_SY_CONVERSION_NO_NUMBER'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342936#M516610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I test a subroutine that included in SAPScript,a runtime error occured.Below is the error message.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------" /&gt;&lt;P&gt;Unable to interpret " XXXX.XX " as a number.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------" /&gt;&lt;P&gt;Error Analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; An exception occurred that is explained in detail below.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The exception, which is assigned to class 'CX_SY_CONVERSION_NO_NUMBER', was not&lt;/P&gt;&lt;P&gt;  caught in&lt;/P&gt;&lt;P&gt; procedure "SUB_DETAILS" "(FORM)", nor was it propagated by a RAISING clause. Since the caller of the procedure could not have anticipated that the&lt;/P&gt;&lt;P&gt; exception would occur, the current program is terminated.The reason for the exception is:&lt;/P&gt;&lt;P&gt;The program attempted to interpret the value " XXXX.XX " as a number, but&lt;/P&gt;&lt;P&gt; since the value contravenes the rules for correct number formats,&lt;/P&gt;&lt;P&gt; this was not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: GV_AMOUNT TYPE KWBTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE IN_PAR WITH KEY NAME =  'FEBSCA-KWBTR'.&lt;/P&gt;&lt;P&gt; PACK IN_PAR-VALUE TO GV_AMOUNT.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; GV_AMOUNT = IN_PAR-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i solve this ? Big help needed. Appreciated. Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shehryar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 06:12:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342936#M516610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T06:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Solve Runtime errors 'CX_SY_CONVERSION_NO_NUMBER'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342937#M516611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am guessing this is because the string is coming in with '.' as the decinal point but you have ',' or something else set as your personal decinal point.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 06:17:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342937#M516611</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2007-06-14T06:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Solve Runtime errors 'CX_SY_CONVERSION_NO_NUMBER'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342938#M516612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am guessing this is because the string is coming in with '.' as the decinal point but you have ',' or something else set as your personal decinal point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can either change your setting to accept '.' as the dp or you can edit the string to change ',' to '.'.&lt;/P&gt;&lt;P&gt;eg,&lt;/P&gt;&lt;P&gt;replace all occurences of '.' in l_string with ',' .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 06:17:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342938#M516612</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2007-06-14T06:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Solve Runtime errors 'CX_SY_CONVERSION_NO_NUMBER'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342939#M516613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your sap script, before calling the routine &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: SET COUNTRY &amp;lt;YOUR COUNTRY&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;send the value as &amp;amp;WRBTR(T)&amp;amp;. This takes away the grouping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the subroutine:&lt;/P&gt;&lt;P&gt;SET COUNTRY &amp;lt;YOUR COUNTRY&amp;gt;.&lt;/P&gt;&lt;P&gt;Then rest step as it is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;S. Chandra Mouli.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 06:25:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342939#M516613</guid>
      <dc:creator>former_member784222</dc:creator>
      <dc:date>2007-06-14T06:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Solve Runtime errors 'CX_SY_CONVERSION_NO_NUMBER'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342940#M516614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi shehryar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you do a test output in SAPscript forms development in SE71, output fields are filled with X characters regardless if they are numeric. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you call a subroutine in SAPScript, the values are passed and the CX_SY_CONVERSION_NO_NUMBER is raised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your subroutine you should be aware that all Sapscript symbols are character-like data and must be converted to numeric representation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to integrate this subroutine (derived from Padmam's contribution yesterday):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  conv
*&amp;amp;---------------------------------------------------------------------*
*       Try conversion to numeric value
*----------------------------------------------------------------------*
FORM conv  USING    pv_clike TYPE c
           CHANGING pv_number
                    pv_error TYPE sy-subrc.

  TRY.
      CLEAR pv_error.
      pv_number = pv_clike. "Convert string to number.
    CATCH cx_sy_conversion_no_number.
      pv_error = 1.
    CATCH cx_sy_conversion_overflow.
      pv_error = 2.
  ENDTRY.

ENDFORM.                    " conv
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can test your form as well as use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 07:21:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342940#M516614</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-06-14T07:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Solve Runtime errors 'CX_SY_CONVERSION_NO_NUMBER'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342941#M516615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys..!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 13:37:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/solve-runtime-errors-cx-sy-conversion-no-number/m-p/2342941#M516615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T13:37:33Z</dc:date>
    </item>
  </channel>
</rss>

