<?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: Extract numeric string in string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-numeric-string-in-string/m-p/1475182#M222836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use the below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lstr = '121354ad'.&lt;/P&gt;&lt;P&gt;if lstr ca sy-abcde.&lt;/P&gt;&lt;P&gt;   write lstr+0(sy-fdpos) to lnum.&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;Anurag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note you might need to translate to upper case as CA is case-sensitive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Aug 2006 09:46:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-17T09:46:00Z</dc:date>
    <item>
      <title>Extract numeric string in string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-numeric-string-in-string/m-p/1475180#M222834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to extract numeric string from astring.&lt;/P&gt;&lt;P&gt;it should stop reading if it hits an alphabet that is requirement.it is not that numeric string is of fixed lenght but it will be in begining.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:78965rocksalt&lt;/P&gt;&lt;P&gt;result:78965.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2006 09:40:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-numeric-string-in-string/m-p/1475180#M222834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-17T09:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Extract numeric string in string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-numeric-string-in-string/m-p/1475181#M222835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT ZTESTH .&lt;/P&gt;&lt;P&gt;DATA: P(5) TYPE N,&lt;/P&gt;&lt;P&gt;T TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P = '123AD'.&lt;/P&gt;&lt;P&gt;T = P.&lt;/P&gt;&lt;P&gt;WRITE T.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;execute above report and check. it will solve ur doubt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2006 09:43:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-numeric-string-in-string/m-p/1475181#M222835</guid>
      <dc:creator>hymavathi_oruganti</dc:creator>
      <dc:date>2006-08-17T09:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extract numeric string in string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-numeric-string-in-string/m-p/1475182#M222836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use the below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lstr = '121354ad'.&lt;/P&gt;&lt;P&gt;if lstr ca sy-abcde.&lt;/P&gt;&lt;P&gt;   write lstr+0(sy-fdpos) to lnum.&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;Anurag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note you might need to translate to upper case as CA is case-sensitive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2006 09:46:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-numeric-string-in-string/m-p/1475182#M222836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-17T09:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extract numeric string in string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-numeric-string-in-string/m-p/1475183#M222837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Declare the variable as type N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: a1(20) type c value '78945asdfaf',&lt;/P&gt;&lt;P&gt;      a2(5)  type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a2 = a1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ a1,&lt;/P&gt;&lt;P&gt;      / a2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Subbu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2006 09:47:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-numeric-string-in-string/m-p/1475183#M222837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-17T09:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Extract numeric string in string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-numeric-string-in-string/m-p/1475184#M222838</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 fm PREPARE_STRING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA zahl(11) VALUE ' 0123456789'.

    CALL FUNCTION 'PREPARE_STRING'
         EXPORTING
              i_valid_chars  = zahl
              i_xvalid_check = 'X'
              i_xchar_repl   = 'X'
              i_xtoupper     = 'X'
         CHANGING
              c_string       = example.

    CONDENSE example NO-GAPS.
    result = example.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls reward useful answers&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2006 10:03:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-numeric-string-in-string/m-p/1475184#M222838</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-08-17T10:03:32Z</dc:date>
    </item>
  </channel>
</rss>

