<?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 split the string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-the-string/m-p/4447604#M1054764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But the number of fields in table1 are not constant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Sep 2008 05:40:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-08T05:40:56Z</dc:date>
    <item>
      <title>How to split the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-the-string/m-p/4447602#M1054762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;I have a requirement where i want to split the string and place into the internal table which has the format (row,col,value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;abc#def#ghi#&lt;/P&gt;&lt;P&gt;jkl#mno#pqr#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(In table1 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want above table to be splitted to below format&lt;/P&gt;&lt;P&gt;Table2&lt;/P&gt;&lt;P&gt;row   col     value &lt;/P&gt;&lt;P&gt;1       1       abc&lt;/P&gt;&lt;P&gt;1       2       def&lt;/P&gt;&lt;P&gt;1       3       ghi&lt;/P&gt;&lt;P&gt;2       1       jkl&lt;/P&gt;&lt;P&gt;2       2       mno&lt;/P&gt;&lt;P&gt;2       3       pqr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out in solving this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2008 05:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-the-string/m-p/4447602#M1054762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-08T05:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to split the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-the-string/m-p/4447603#M1054763</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 from &lt;STRONG&gt;sap&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: NAMES(30)    TYPE C VALUE 'Charly, John , Peter', &lt;/P&gt;&lt;P&gt;      NAMES2       TYPE STRING, &lt;/P&gt;&lt;P&gt;      ONE(10)      TYPE C, &lt;/P&gt;&lt;P&gt;      TWO(10)      TYPE C, &lt;/P&gt;&lt;P&gt;      THREE        TYPE STRING, &lt;/P&gt;&lt;P&gt;      FOUR(4)      TYPE C VALUE 'FOUR', &lt;/P&gt;&lt;P&gt;      DELIMITER(2) VALUE ','. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT NAMES AT DELIMITER INTO ONE TWO. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ONE contains 'Charly' and TWO contains 'John , Pet'. &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    SY-SUBRC is 4, because TWO was not large enough to &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    accommodate the whole of the remaining string &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SPLIT NAMES AT ',' INTO ONE TWO THREE. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ONE contains 'Charly', TWO contains ' John', &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    THREE contains ' Peter'. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SPLIT NAMES AT ', ' INTO ONE THREE TWO. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ONE contains 'Charly', THREE contains 'John', &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    TWO contains 'Peter'. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CONCATENATE NAMES '' INTO NAMES2 SEPARATED BY SPACE. &lt;/P&gt;&lt;P&gt;SPLIT NAMES2 AT DELIMITER INTO ONE TWO THREE FOUR. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ONE contains 'Charly', TWO contains 'John', &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    THREE contains 'Peter ', FOUR is empty. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SPLIT NAMES2 AT DELIMITER INTO ONE FOUR THREE. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ONE contains 'Charly', FOUR contains 'John', &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    THREE contains 'Peter', SY-SUBRC is 4, since &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FOUR was not large enough (spaces are significant &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    characters!)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2008 05:36:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-the-string/m-p/4447603#M1054763</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2008-09-08T05:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to split the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-the-string/m-p/4447604#M1054764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But the number of fields in table1 are not constant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2008 05:40:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-the-string/m-p/4447604#M1054764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-08T05:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to split the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-the-string/m-p/4447605#M1054765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using below syntax it solved my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT itab2-b AT '#' INTO TABLE ITAB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2008 05:47:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-the-string/m-p/4447605#M1054765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-08T05:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to split the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-the-string/m-p/4447606#M1054766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just check this code outline..&lt;/P&gt;&lt;P&gt;this is just a outline and i guess its not bug free.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
	data:len type i.
	data:i type i.
	data:j type i.
	data:k type i.



	loop at table1.
		i = 1.
		j = 0.
		k = 0.
		table2-row = sy-tabix.
		len = strlen( table1-field ).
		len = len - 1.
		while i &amp;lt;= len.
			if table1-field+j(i) &amp;lt;&amp;gt; '#'.
				table2-value = table1-field+j(i).
			else.
				k = k + 1.
				table2-col = k.
				append table2.
			endif.
			i = i + 1.
		endwhile.
	endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2008 06:00:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-the-string/m-p/4447606#M1054766</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2008-09-08T06:00:39Z</dc:date>
    </item>
  </channel>
</rss>

