<?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: Function module to check whether the input field value is numeric or not in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-check-whether-the-input-field-value-is-numeric-or-not/m-p/1672917#M297219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   If it is type I or integer type then you can use &lt;/P&gt;&lt;P&gt;DATA: integer type i,&lt;/P&gt;&lt;P&gt;       var1 type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var1 = integer&lt;/P&gt;&lt;P&gt;if var1 CO '0123456789.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;its numberic&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Nov 2006 08:39:29 GMT</pubDate>
    <dc:creator>seshatalpasai_madala</dc:creator>
    <dc:date>2006-11-06T08:39:29Z</dc:date>
    <item>
      <title>Function module to check whether the input field value is numeric or not</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-check-whether-the-input-field-value-is-numeric-or-not/m-p/1672915#M297217</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 wanted to check whether the input field has the numeric value or not. What is the function module to check whether it is numeric field or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 08:37:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-check-whether-the-input-field-value-is-numeric-or-not/m-p/1672915#M297217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T08:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to check whether the input field value is numeric or not</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-check-whether-the-input-field-value-is-numeric-or-not/m-p/1672916#M297218</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;&amp;lt;b&amp;gt;CATS_NUMERIC_INPUT_CHECK&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the Function Module:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;numeric_check.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usage:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
STRING_IN = X
IMPORTING
STRING_OUT = X
HTYPE = H_TYPE.
if h_type = 'CHAR'.


WRITE:/ 'NOt Numeric'.
else.
write:/ 'Numeric'.
ENDIF&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;&amp;lt;b&amp;gt;With out Any FM&amp;lt;/b&amp;gt;&lt;/STRONG&gt;*******&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: field(10) type c value '1%56539'. 
data: length type i. length = strlen( field ). 
if field(length) co '1234567890'. 
write:/ 'This is a number'.
 else. 
write:/ 'This is not a number'. endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can even use CATS_NUMERIC_INPUT_CHECK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Check for Numeric Value
 
call function 'CATS_NUMERIC_INPUT_CHECK'
 exporting
   input = t_return-fieldval
 exceptions
   no_numeric = 1
   others = 2.
 
if sy-subrc = 0.
read table t_f4_table index t_return-fieldval.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgards&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Kinly mark points if ur issue solved&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 08:38:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-check-whether-the-input-field-value-is-numeric-or-not/m-p/1672916#M297218</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-11-06T08:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to check whether the input field value is numeric or not</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-check-whether-the-input-field-value-is-numeric-or-not/m-p/1672917#M297219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   If it is type I or integer type then you can use &lt;/P&gt;&lt;P&gt;DATA: integer type i,&lt;/P&gt;&lt;P&gt;       var1 type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var1 = integer&lt;/P&gt;&lt;P&gt;if var1 CO '0123456789.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;its numberic&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 08:39:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-check-whether-the-input-field-value-is-numeric-or-not/m-p/1672917#M297219</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2006-11-06T08:39:29Z</dc:date>
    </item>
  </channel>
</rss>

