<?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: Find a variable length string between two strings in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-a-variable-length-string-between-two-strings/m-p/11781539#M1952744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could search for occurrence of &amp;lt;/MOABETR&amp;gt; too, and then combine the values to get the correct start and length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards,&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jun 2016 08:58:01 GMT</pubDate>
    <dc:creator>ThomasKruegl</dc:creator>
    <dc:date>2016-06-06T08:58:01Z</dc:date>
    <item>
      <title>Find a variable length string between two strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-a-variable-length-string-between-two-strings/m-p/11781537#M1952742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;I have a requirement where i have to fetch a sub-string of variable length between two substring in a string.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;I have a string like this:&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;lt;MOABETR&amp;gt;amount&amp;lt;/MOABETR&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;i need to fetch value of amount and length of amount can vary. Is there any way to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;IF i search for occurrence of &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; background: transparent;"&gt;&amp;lt;MOABETR&amp;gt; and get the offset and i add the length of it to that offset and start fetching value from there, i wouldn't be sure; how many characters to fetch because length of amount varies.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Dheeraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 14:35:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-a-variable-length-string-between-two-strings/m-p/11781537#M1952742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-06-03T14:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Find a variable length string between two strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-a-variable-length-string-between-two-strings/m-p/11781538#M1952743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As the tags are XML alike, you could try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execute function module SCMS_STRING_TO_XSTRING with importing parameter TEXT = &lt;SPAN style="color: #333333; font-size: 12px;"&gt;&amp;lt;MOABETR&amp;gt;amount&amp;lt;/MOABETR&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The restult will be in the exporting parameter buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;execute function module SMUM_XML_PARSE and use the buffer as input for XML_INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the table XML_TABLE will have what you need &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 14:53:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-a-variable-length-string-between-two-strings/m-p/11781538#M1952743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-06-03T14:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Find a variable length string between two strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-a-variable-length-string-between-two-strings/m-p/11781539#M1952744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could search for occurrence of &amp;lt;/MOABETR&amp;gt; too, and then combine the values to get the correct start and length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards,&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 08:58:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-a-variable-length-string-between-two-strings/m-p/11781539#M1952744</guid>
      <dc:creator>ThomasKruegl</dc:creator>
      <dc:date>2016-06-06T08:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Find a variable length string between two strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-a-variable-length-string-between-two-strings/m-p/11781540#M1952745</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;Check this example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;L_STRING &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;STRING &lt;SPAN class="L0S52"&gt;VALUE &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'&amp;lt;MOABETR&amp;gt;1234567890&amp;lt;/MOABETR&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; L_OUT&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;STRING&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; L_LEN&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;I&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;REPLACE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OCCURRENCES &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;REGEX &lt;SPAN class="L0S33"&gt;'[A-Z]' &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;IN &lt;/SPAN&gt;L_STRING &lt;SPAN class="L0S52"&gt;WITH &lt;/SPAN&gt;SPACE &lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; L_LEN &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;STRLEN&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;L_STRING &lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S70"&gt;- &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;5&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; L_OUT &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;L_STRING+2&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;L_LEN&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;L_out&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 09:13:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-a-variable-length-string-between-two-strings/m-p/11781540#M1952745</guid>
      <dc:creator>pranay570708</dc:creator>
      <dc:date>2016-06-06T09:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Find a variable length string between two strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-a-variable-length-string-between-two-strings/m-p/11781541#M1952746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response but that string could be repeated as well. Glenn's answer seems best. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 09:20:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-a-variable-length-string-between-two-strings/m-p/11781541#M1952746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-06-06T09:20:34Z</dc:date>
    </item>
  </channel>
</rss>

