<?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 Re: Checking whether a String only containes numbers in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921164#M382713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Lilan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* String contains only digits
  IF ( string CO '0123456789' ).  " or CO '01234567890 ' including space

  ELSE.

  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Feb 2007 08:06:51 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2007-02-22T08:06:51Z</dc:date>
    <item>
      <title>Checking whether a String only containes numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921163#M382712</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;   I have a string. This can sometimes contain only numbers. Is there and method to check whether the staring is a number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lilan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 07:51:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921163#M382712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-22T07:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Checking whether a String only containes numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921164#M382713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Lilan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* String contains only digits
  IF ( string CO '0123456789' ).  " or CO '01234567890 ' including space

  ELSE.

  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:06:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921164#M382713</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-02-22T08:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Checking whether a String only containes numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921165#M382714</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;Use this FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NUMERIC_CHECK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STRING_OUT                      A123344&lt;/P&gt;&lt;P&gt;HTYPE                           CHAR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:07:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921165#M382714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-22T08:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Checking whether a String only containes numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921166#M382715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this demo code  -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data l_text type string.&lt;/P&gt;&lt;P&gt;data d1 type i.&lt;/P&gt;&lt;P&gt;data d2 like sy-abcde.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_text = '12'.&lt;/P&gt;&lt;P&gt;d2 = sy-abcde.&lt;/P&gt;&lt;P&gt;translate d2 to lower case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_text CA sy-ABCDE or&lt;/P&gt;&lt;P&gt;   l_text CA d2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write 'char'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write ' num'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:10:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921166#M382715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-22T08:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Checking whether a String only containes numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921167#M382716</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;u can check like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if v_str CO '0123456789'.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:10:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921167#M382716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-22T08:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Checking whether a String only containes numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921168#M382717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use&lt;/P&gt;&lt;P&gt;if str co '0123456789'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or fm NUMERIC_CHECK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:17:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921168#M382717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-22T08:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Checking whether a String only containes numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921169#M382718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lilan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just follow the foll steps :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.  Declare var1 type d&lt;/P&gt;&lt;P&gt;                oref type ref to cx_root.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Write the foll code(assuming str is your string )&lt;/P&gt;&lt;P&gt;    try.&lt;/P&gt;&lt;P&gt;      d = s / 2.&lt;/P&gt;&lt;P&gt;    catch cx_sy_conversion_no_number into oref.&lt;/P&gt;&lt;P&gt;    endtry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. If oref is initial, the string is a number&lt;/P&gt;&lt;P&gt;    Else the string has some alphabets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:25:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-whether-a-string-only-containes-numbers/m-p/1921169#M382718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-22T08:25:34Z</dc:date>
    </item>
  </channel>
</rss>

