<?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 FM to pick only numeric value from char string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-pick-only-numeric-value-from-char-string/m-p/2869674#M673282</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please tell me how to pick only numeric value from character string. Is any function module available?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji Viswanath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Oct 2007 15:32:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-03T15:32:37Z</dc:date>
    <item>
      <title>FM to pick only numeric value from char string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-pick-only-numeric-value-from-char-string/m-p/2869674#M673282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please tell me how to pick only numeric value from character string. Is any function module available?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji Viswanath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 15:32:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-pick-only-numeric-value-from-char-string/m-p/2869674#M673282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-03T15:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: FM to pick only numeric value from char string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-pick-only-numeric-value-from-char-string/m-p/2869675#M673283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I would do is grab the string and check is character by assign it to a type i variable. Using Try Catch you can catch the exception raised  and then discard that value. If the assignment is successfully then you will be touching a number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;CL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 15:39:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-pick-only-numeric-value-from-char-string/m-p/2869675#M673283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-03T15:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: FM to pick only numeric value from char string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-pick-only-numeric-value-from-char-string/m-p/2869676#M673284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can assign the character variable(type c) to a numeric value(type n) this assignment ignores the non-numeric values in the character variable and only moves numeric values to the target variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ztest.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  w_char(10) type c value '123*4%56',&lt;/P&gt;&lt;P&gt;  w_num(10)  type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  w_num = w_char.&lt;/P&gt;&lt;P&gt;  write w_num.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;Result:0000123456&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 15:46:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-pick-only-numeric-value-from-char-string/m-p/2869676#M673284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-03T15:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: FM to pick only numeric value from char string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-pick-only-numeric-value-from-char-string/m-p/2869677#M673285</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 am not sure about FM but you can try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: TEXT    TYPE STRING VALUE '1ABCD2345EFGH',
      AMOUNT  TYPE STRING,
      NUM    TYPE I.
                                                                        
NUM = STRLEN( TEXT ).
                                                                        
DO NUM TIMES.
  IF TEXT(1) CA '0123456789'.
    CONCATENATE AMOUNT TEXT(1) INTO AMOUNT.
    CONDENSE AMOUNT NO-GAPS.
  ENDIF.
  SHIFT TEXT LEFT CIRCULAR.
ENDDO.
                                                                        
WRITE AMOUNT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 16:00:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-pick-only-numeric-value-from-char-string/m-p/2869677#M673285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-03T16:00:21Z</dc:date>
    </item>
  </channel>
</rss>

