<?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 can i Pick the data from the string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571501#M1432910</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also use SPLIT.&lt;/P&gt;&lt;P&gt;split lv_string at '-' into lv_str1 lv_str2.&lt;/P&gt;&lt;P&gt;write lv_str2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jan 2010 14:12:03 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2010-01-29T14:12:03Z</dc:date>
    <item>
      <title>How can i Pick the data from the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571499#M1432908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i Pick the data from the string using regular expressions. for ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) 10000-san0001&lt;/P&gt;&lt;P&gt;2) 3000000-rani0001&lt;/P&gt;&lt;P&gt;3) 30-super003&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its doesnt mainain how many characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like this i got string. now i only want  after the symobl( -) text (san&lt;/P&gt;&lt;P&gt;                                                                                rani&lt;/P&gt;&lt;P&gt;                                                                                super)  .how can i pick that &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone provide me regular expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Sandya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sandya rani on Jan 29, 2010 2:51 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 13:41:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571499#M1432908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-29T13:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can i Pick the data from the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571500#M1432909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note: Moved thread from Web Dynpro ABAP to ABAP General.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 13:55:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571500#M1432909</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2010-01-29T13:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: How can i Pick the data from the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571501#M1432910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also use SPLIT.&lt;/P&gt;&lt;P&gt;split lv_string at '-' into lv_str1 lv_str2.&lt;/P&gt;&lt;P&gt;write lv_str2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 14:12:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571501#M1432910</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-01-29T14:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can i Pick the data from the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571502#M1432911</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;Pls find the below logic where str1 wwil hold text data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_string type string,&lt;/P&gt;&lt;P&gt;      str1 TYPE string,&lt;/P&gt;&lt;P&gt;      str2 TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_string = '3000000-rani0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT l_string AT '-' INTO: str1 str2 .&lt;/P&gt;&lt;P&gt;clear: l_string,str1.&lt;/P&gt;&lt;P&gt;SPLIT str2 AT '0' INTO: str1 l_string.&lt;/P&gt;&lt;P&gt;write:/ str1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 14:14:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571502#M1432911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-29T14:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can i Pick the data from the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571503#M1432912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try a substring_after  function like described in [substring, substring_... - Substring Functions|http://help.sap.com/abapdocu_70/en/ABENSUBSTRING_FUNCTIONS.htm] in [Regular Expressions|http://help.sap.com/abapdocu_70/en/ABENREGULAR_EXPRESSIONS.htm]&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;resultstring = substring_after( val = inputstring sub = '-' ). &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 14:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571503#M1432912</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-01-29T14:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can i Pick the data from the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571504#M1432913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  lokesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for ur reply  .i need only text .i cant  use this statement SPLIT str2 AT '0' INTO: str1 l_string. coz it does not maintain "0" alwasy please see the emple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) 10000-san2001&lt;/P&gt;&lt;P&gt;2) 3000000-ran10001&lt;/P&gt;&lt;P&gt;3) 30-super3003&lt;/P&gt;&lt;P&gt;4)4000000000-naga100001.&lt;/P&gt;&lt;P&gt;5)4-swarna10000000001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i only want  1)san&lt;/P&gt;&lt;P&gt;2)ran&lt;/P&gt;&lt;P&gt;3)super&lt;/P&gt;&lt;P&gt;4)naga&lt;/P&gt;&lt;P&gt;5)swarna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jan 2010 15:34:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571504#M1432913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-30T15:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can i Pick the data from the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571505#M1432914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_string = '3000000-rani0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT l_string AT '-' INTO str1 str2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace all occurrences of REGEX '[/d]'   in str with space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write str2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jan 2010 18:29:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571505#M1432914</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-01-30T18:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can i Pick the data from the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571506#M1432915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kesav&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried  .its not working  .output is coming like this  ex: rani0001&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jan 2010 19:33:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571506#M1432915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-30T19:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can i Pick the data from the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571507#M1432916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_string = '3000000-rani0001'.&lt;/P&gt;&lt;P&gt;SPLIT lv_string AT '-' INTO str1 str2 .&lt;/P&gt;&lt;P&gt;lv_len = strlen( str2 ).&lt;/P&gt;&lt;P&gt;FIND REGEX '([[:alpha:]]*)' IN str2 IGNORING CASE MATCH OFFSET lv_moff  MATCH LENGTH  lv_mlen.&lt;/P&gt;&lt;P&gt;lv_length = lv_len -  lv_mlen.&lt;/P&gt;&lt;P&gt;lv_out = str2+lv_mlen(lv_length).&lt;/P&gt;&lt;P&gt;write lv_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you need the text then&lt;/P&gt;&lt;P&gt;FIND REGEX '(*[[:/d:]])' IN str2 MATCH OFFSET lv_moff  MATCH LENGTH  lv_mlen.&lt;/P&gt;&lt;P&gt;lv_out = str2+0(lv_mlen).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try also&lt;/P&gt;&lt;P&gt;Replace all occurrences of  REGEX '(*[[:/d:]])' IN str2 with space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Keshav.T on Jan 31, 2010 10:53 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Jan 2010 04:55:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571507#M1432916</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-01-31T04:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can i Pick the data from the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571508#M1432917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT  ZTEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: str1 TYPE string,&lt;/P&gt;&lt;P&gt;str2 TYPE string,&lt;/P&gt;&lt;P&gt;str3 TYPE string,&lt;/P&gt;&lt;P&gt;lenth TYPE string,&lt;/P&gt;&lt;P&gt;str4 TYPE string,&lt;/P&gt;&lt;P&gt;temp type i value '0'.&lt;/P&gt;&lt;P&gt;data: ii type i value '0',&lt;/P&gt;&lt;P&gt;      jj type i value '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : begin of itab OCCURS 0,&lt;/P&gt;&lt;P&gt;l_string type string,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;itab-l_string = '3000000-GUNDALA20001'.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt;itab-l_string = '2045677-iCVj1001'.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt;itab-l_string = '3000-ragh30001'.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  MOVE 0 TO ii.&lt;/P&gt;&lt;P&gt;  MOVE 1 TO jj.&lt;/P&gt;&lt;P&gt;  SPLIT itab-l_string AT '-' INTO: str1 str2 .&lt;/P&gt;&lt;P&gt;  clear: itab-l_string,str1.&lt;/P&gt;&lt;P&gt;  lenth = strlen( str2 ).&lt;/P&gt;&lt;P&gt;  while temp &amp;lt; lenth.&lt;/P&gt;&lt;P&gt;    str4 = str2+ii(jj).&lt;/P&gt;&lt;P&gt;    if str4 CA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' or str4 CA 'abcdefghijklmnopqrstuvwxyz'.&lt;/P&gt;&lt;P&gt;      if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        CONCATENATE str3 str4 into str3.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      ii = ii + 1.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    temp = temp + 1.&lt;/P&gt;&lt;P&gt;  ENDWHILE.&lt;/P&gt;&lt;P&gt;  write: / str3.&lt;/P&gt;&lt;P&gt;  clear: itab, ii, jj,str1, str2, str3, str4,temp, lenth.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 09:39:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571508#M1432917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-02T09:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can i Pick the data from the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571509#M1432918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi avoid complications and use this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: str1 TYPE string,
str2 TYPE string.

Data : begin of itab OCCURS 0,
l_string type string,
end of itab.
itab-l_string = '3000000-GUNDALA20001'.
append itab.
clear itab.
itab-l_string = '2045677-iCVj1001'.
append itab.
clear itab.
itab-l_string = '3000-ragh30001'.
append itab.
clear itab.

loop at itab.
  SPLIT itab-l_string AT '-' INTO: str1 str2 .
  if str2 ca '1234567890'.
    write / str2+sy-fdpos(*).
  endif.
Endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 09:51:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-pick-the-data-from-the-string/m-p/6571509#M1432918</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-02-02T09:51:28Z</dc:date>
    </item>
  </channel>
</rss>

