<?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 function in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340760#M172460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to try something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report  zrich_0001.


data: str type string.
data: istr type table of str with header line.

data: begin of xstructure,
      field1(10) type c,
      field2(10) type c,
      field3(10) type c,
      field4(10) type c,
      end of xstructure.

field-symbols: &amp;lt;fs&amp;gt;.

str = '12,345,678,901'.

split str at ',' into table istr.

do.

  read table istr index sy-index.
  if sy-subrc &amp;lt;&amp;gt; 0.
    exit.
  endif.

  assign component sy-index of structure xstructure to &amp;lt;fs&amp;gt;.

  &amp;lt;fs&amp;gt; = istr.


enddo.

write:/ xstructure-field1,
        xstructure-field2,
        xstructure-field3,
        xstructure-field4.

&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;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 May 2006 16:07:38 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-05-04T16:07:38Z</dc:date>
    <item>
      <title>SPLIT function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340755#M172455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, i need separate a string, example, 1,95,02,55, by ',' into a internal table. if i use "SPLIT p_frase AT ',' INTO TABLE t_frase"  but it create a registry for string. Is it posible in only one registry?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excuse for my bad english.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 15:38:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340755#M172455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-04T15:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340756#M172456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what you mean by registry.  By using the statement that you have provided, it will break the string into the specific parts into each line of the internal table.  So if there are 4 fields in your string delimited by ',' you will have 4 records in your internal table.  You can also break it out into individual fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;split field_string at ',' into field1 field2 field3 field4.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 15:44:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340756#M172456</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-05-04T15:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340757#M172457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thats ok, but my internal table has 26 fields and i want to know if there are one fast way ;-).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 15:51:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340757#M172457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-04T15:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340758#M172458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure, but try this.&lt;/P&gt;&lt;P&gt;Have a work area of the table&lt;/P&gt;&lt;P&gt;SPLIT STRING_vAR AT ',' INTO WA_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure but this might get the values into individual tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 15:55:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340758#M172458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-04T15:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340759#M172459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it´s no good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 16:07:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340759#M172459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-04T16:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340760#M172460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to try something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report  zrich_0001.


data: str type string.
data: istr type table of str with header line.

data: begin of xstructure,
      field1(10) type c,
      field2(10) type c,
      field3(10) type c,
      field4(10) type c,
      end of xstructure.

field-symbols: &amp;lt;fs&amp;gt;.

str = '12,345,678,901'.

split str at ',' into table istr.

do.

  read table istr index sy-index.
  if sy-subrc &amp;lt;&amp;gt; 0.
    exit.
  endif.

  assign component sy-index of structure xstructure to &amp;lt;fs&amp;gt;.

  &amp;lt;fs&amp;gt; = istr.


enddo.

write:/ xstructure-field1,
        xstructure-field2,
        xstructure-field3,
        xstructure-field4.

&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;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 16:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340760#M172460</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-05-04T16:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340761#M172461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok thank you very much. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 16:17:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-function/m-p/1340761#M172461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-04T16:17:39Z</dc:date>
    </item>
  </channel>
</rss>

