<?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: How to fetch intiger values from string. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000877#M407251</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt; Only digits in the string are copied when conversion from string to numc takes place. The field is right-justified and filled with trailing zeros. If the target field is too short, it is truncated from the left.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;veeresh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        veereshbabu ponnada&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Mar 2007 09:42:03 GMT</pubDate>
    <dc:creator>former_member673464</dc:creator>
    <dc:date>2007-03-23T09:42:03Z</dc:date>
    <item>
      <title>How to fetch intiger values from string.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000876#M407250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need one help.&lt;/P&gt;&lt;P&gt;I want to fetch the particular integer values from one string...&lt;/P&gt;&lt;P&gt;Exp: I am having the field value like "ABCD123456" or "ABC 123456" or "ABCDE 123456".&lt;/P&gt;&lt;P&gt;Now i want to get the integer values. Here I need only "123456"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Sridhar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 09:40:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000876#M407250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T09:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch intiger values from string.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000877#M407251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt; Only digits in the string are copied when conversion from string to numc takes place. The field is right-justified and filled with trailing zeros. If the target field is too short, it is truncated from the left.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;veeresh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        veereshbabu ponnada&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 09:42:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000877#M407251</guid>
      <dc:creator>former_member673464</dc:creator>
      <dc:date>2007-03-23T09:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch intiger values from string.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000878#M407252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if v_string ca '0123456789 '.&lt;/P&gt;&lt;P&gt;v_number = v_string+sy-fdpos.&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;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 09:43:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000878#M407252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T09:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch intiger values from string.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000879#M407253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THIS may be useful to ur issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CP (Contains Pattern): &lt;/P&gt;&lt;P&gt;The complete string c1 matches the pattern c2 (c1 "matches" c2). &lt;/P&gt;&lt;P&gt;The pattern c2 can contain ordinary characters and wildcards. &lt;/P&gt;&lt;P&gt;'*' stands for any character string and '+' denotes any character. &lt;/P&gt;&lt;P&gt;If the result of the comparison is positive, the system field SY-FDPOS contains the offset of the first character of c2 in c1. The wildcard character '*' at the beginning of the pattern c2 is ignored when determining the value of SY-FDPOS. &lt;/P&gt;&lt;P&gt;If the result of the comparison is negative, the system field SY-FDPOS contains the length of c1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'ABCDE' CP '&lt;STRONG&gt;CD&lt;/STRONG&gt;' is true; SY-FDPOS = 2. &lt;/P&gt;&lt;P&gt;'ABCDE' CP '*CD' is false; SY-FDPOS = 5. &lt;/P&gt;&lt;P&gt;'ABCDE' CP '+&lt;EM&gt;CD&lt;/EM&gt;' is true; SY-FDPOS = 0. &lt;/P&gt;&lt;P&gt;'ABCDE' CP '+CD*' is false; SY-FDPOS = 5. &lt;/P&gt;&lt;P&gt;'ABCDE' CP '&lt;STRONG&gt;B&lt;/STRONG&gt;D*' is true; SY-FDPOS = 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 09:46:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000879#M407253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T09:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch intiger values from string.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000880#M407254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sridhar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a simple solution...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:str type string value 'ABCD123456',&lt;/P&gt;&lt;P&gt;     val(10) type n.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;     val = str.&lt;/P&gt;&lt;P&gt;     write: val NO-ZERO .&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;output :  123456   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 09:57:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000880#M407254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T09:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch intiger values from string.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000881#M407255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sridhar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  YCHATEST1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA : v_str  type String,&lt;/P&gt;&lt;P&gt;             V_len type i,&lt;/P&gt;&lt;P&gt;              v_num type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     v_str =   'ABCD123456'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    v_len =  strlen( v_str ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    do .&lt;/P&gt;&lt;P&gt;       v_num = v_num + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     if  v_len eq v_num.&lt;/P&gt;&lt;P&gt;        exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;         if v_str+0(v_num) ca sy-abcde.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               REPLACE v_str+0(v_num) WITH space  INTO v_str.&lt;/P&gt;&lt;P&gt;               v_num = v_num - 1 .&lt;/P&gt;&lt;P&gt;               v_len = v_len - 1.&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;     endif.&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 10:24:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000881#M407255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T10:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch intiger values from string.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000882#M407256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks man, its really usefull..and i resolved my problem..&lt;/P&gt;&lt;P&gt;thanks to all who replied to my query....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 10:27:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000882#M407256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T10:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch intiger values from string.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000883#M407257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Execute the code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;parameters : val(30)  type c.
data : final(30) type c,
       cnt type i,
       v type c,
       n type i.


cnt = strlen( val ).
do cnt times.
move val+n(1) to v.
if v ca '0123456789'.
move v to final+n(1).
endif.
n = n + 1.
enddo.

condense final no-gaps.

write:/ final .&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;HR originaltext="-----------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Never mind but you could have given a 10 pointer to kiran for his time and idea .. its just a request .. &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;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 10:27:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-intiger-values-from-string/m-p/2000883#M407257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T10:27:58Z</dc:date>
    </item>
  </channel>
</rss>

