<?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: Split a string into multiple internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205251#M1626780</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There should be some better solutions for this instead of creating internal tables for each row in the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; What is the maximum row count expected ( is it 26 ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let us know what are you going to do after moving each row to a internal table ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Oct 2011 07:00:16 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2011-10-12T07:00:16Z</dc:date>
    <item>
      <title>Split a string into multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205248#M1626777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to split a string based internal table into multiple internal tables based on some sub strings in that string based internal table...&lt;/P&gt;&lt;P&gt;&lt;DEL&gt;High priority help me out...&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg...&lt;/P&gt;&lt;P&gt;a | jhkhjk | kljdskj |lkjdlj |&lt;/P&gt;&lt;P&gt;b | kjhdkjh | kldjkj |&lt;/P&gt;&lt;P&gt;c | jndojkok |&lt;/P&gt;&lt;P&gt;d |&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this data which is in the application server file is brought into a internal table as a text. Now i need to send 'a' to one internal table, 'b' to one internal table, so on... help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;Priority downgraded&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Oct 12, 2011 12:24 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 06:44:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205248#M1626777</guid>
      <dc:creator>pradeep_grandhi</dc:creator>
      <dc:date>2011-10-12T06:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Split a string into multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205249#M1626778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you be more clear on what is required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 06:50:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205249#M1626778</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-12T06:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Split a string into multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205250#M1626779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The example says how the file is there in the application server.&lt;/P&gt;&lt;P&gt;Now i got that file read into an internal table which has only 1 field string.&lt;/P&gt;&lt;P&gt;So it would contain only 1 file.&lt;/P&gt;&lt;P&gt;Now i would like to send the line starting with 'a' (in the example) in one internal table, 'b' in another internal table, so on....&lt;/P&gt;&lt;P&gt;how could i send can u help me out wit some logic or code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 06:56:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205250#M1626779</guid>
      <dc:creator>pradeep_grandhi</dc:creator>
      <dc:date>2011-10-12T06:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Split a string into multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205251#M1626780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There should be some better solutions for this instead of creating internal tables for each row in the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; What is the maximum row count expected ( is it 26 ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let us know what are you going to do after moving each row to a internal table ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 07:00:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205251#M1626780</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-10-12T07:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Split a string into multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205252#M1626781</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;&lt;/P&gt;&lt;P&gt;Assign Internal table name dynamicaly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT IT_STR INTO WA_STR.
IF &amp;lt;Cond to put data in table &amp;gt;.
ASSIGN &amp;lt;table&amp;gt; TO &amp;lt;F_TAB&amp;gt;.                "&amp;lt;TABLE&amp;gt; here you hav to required table name
SPLIT WA_STR INTO TABLE &amp;lt;F_TAB&amp;gt;.
ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anmol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: anmol112 on Oct 12, 2011 3:05 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 07:00:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205252#M1626781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-12T07:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Split a string into multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205253#M1626782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First split the line into corresponding columns of the internal table using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab into wa_itab.

SPLIT wa_itab AT '|' into wa_itab1-column1 wa_itab1-column2 wa_itab1-column3.

append wa_itab1 into itab1.

endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read the itab1 using column1 and move the rows into different internal tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 07:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205253#M1626782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-12T07:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Split a string into multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205254#M1626783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pradeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg...&lt;/P&gt;&lt;P&gt;a | jhkhjk | kljdskj |lkjdlj |&lt;/P&gt;&lt;P&gt;b | kjhdkjh | kldjkj |&lt;/P&gt;&lt;P&gt;c | jndojkok |&lt;/P&gt;&lt;P&gt;d |&lt;/P&gt;&lt;P&gt;As per your statement "Now i need to send 'a' to one internal table, 'b' to one internal table" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want only a to one internal table and b to one internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want the whole row of the internal table i mean &lt;/P&gt;&lt;P&gt;a | jhkhjk | kljdskj |lkjdlj | to 1 internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having the case of an internal table which is of type string,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Loop through the internal table.    LOOP AT lt_tab INTO lwa_tab.&lt;/P&gt;&lt;P&gt;2) Ge the work area contents and get the first char wa_tab-string+0(1) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)   FIELD-SYMBOLS: &amp;lt;t_itab&amp;gt; TYPE ANY TABLE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  w_tabname = p_table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE DATA w_dref TYPE TABLE OF (w_tabname).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN w_dref-&amp;gt;* TO &amp;lt;t_itab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow the link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/ab030.htm" target="test_blank"&gt;http://www.sap-img.com/ab030.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdev.co.uk/tips/dynamic-structure.htm" target="test_blank"&gt;http://www.sapdev.co.uk/tips/dynamic-structure.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then based on the sy-tabix values you will get that many number of internal table&lt;/P&gt;&lt;P&gt;       &amp;lt;FS&amp;gt; = wa_tab-string+0(1) &lt;/P&gt;&lt;P&gt;      append  &amp;lt;FS&amp;gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USE SPLIT statement at the relevant seperator&lt;/P&gt;&lt;P&gt;revert for further clarification&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: SRIKANTH P on Oct 12, 2011 12:36 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 07:03:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205254#M1626783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-12T07:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Split a string into multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205255#M1626784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pradeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share your actual requirement ?&lt;/P&gt;&lt;P&gt;Splitting it into different internal tables is very much possible based on 1st field (before 1st pipe) but if there are 1000 rows coming, you may end up with 1000 internal tables. How you declare them ?? It will be always random, right ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Diwakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 07:04:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205255#M1626784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-12T07:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Split a string into multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205256#M1626785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solved by myself...&lt;/P&gt;&lt;P&gt;Thanq all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2011 04:02:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-a-string-into-multiple-internal-tables/m-p/8205256#M1626785</guid>
      <dc:creator>pradeep_grandhi</dc:creator>
      <dc:date>2011-10-17T04:02:50Z</dc:date>
    </item>
  </channel>
</rss>

