<?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 a long text. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-a-long-text/m-p/1517307#M237978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample code is follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: str TYPE string VALUE 'A,B,C,D,E,F,G,H,I,J,K,L',&lt;/P&gt;&lt;P&gt;      itab TYPE string OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT str AT ',' INTO TABLE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;  WRITE:/ itab.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing to worry about the length of string or number of words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Sep 2006 02:08:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-01T02:08:49Z</dc:date>
    <item>
      <title>How to split a long text.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-a-long-text/m-p/1517304#M237975</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;I have a long text like (0001001352, 0001001683, 0001001457, 0001236530, ............... continues). I don&amp;#146;t how long will be the string length either it may contain 1 or more than one numbers. &lt;/P&gt;&lt;P&gt;So my requirement is to split at each comma and store in a range. &lt;/P&gt;&lt;P&gt;If I use split then I don't know how many local fields I need to be declare to hold those split values. &lt;/P&gt;&lt;P&gt;I want to know is their any function module or class, which splits the string at comma and stores in internal table? So that I can store those into my range table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2006 21:56:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-a-long-text/m-p/1517304#M237975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-31T21:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a long text.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-a-long-text/m-p/1517305#M237976</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;do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split wf_text at ',' into wf_first wf_rest.&lt;/P&gt;&lt;P&gt;if wf_rest is initial.  &lt;/P&gt;&lt;P&gt;   append wf_first to tb_table.&lt;/P&gt;&lt;P&gt;   exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wf_first to tb_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wf_text = wf_rest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Abhishek Jolly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Abhishek Jolly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2006 22:02:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-a-long-text/m-p/1517305#M237976</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2006-08-31T22:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a long text.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-a-long-text/m-p/1517306#M237977</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..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data: itab type table of string with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data: lv_string type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SPLIT LV_STRING AT ',' into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2006 22:41:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-a-long-text/m-p/1517306#M237977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-31T22:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a long text.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-a-long-text/m-p/1517307#M237978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample code is follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: str TYPE string VALUE 'A,B,C,D,E,F,G,H,I,J,K,L',&lt;/P&gt;&lt;P&gt;      itab TYPE string OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT str AT ',' INTO TABLE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;  WRITE:/ itab.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing to worry about the length of string or number of words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 02:08:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-a-long-text/m-p/1517307#M237978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T02:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a long text.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-a-long-text/m-p/1517308#M237979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Hi Kumar,

  check this code



REPORT ZRICH_0001.

DATA : BEGIN OF IT_RANGE OCCURS 0,
        SIGN(1),
        OPTION(2),
        LOW TYPE STRING,
        HIGH TYPE STRING,
       END OF IT_RANGE.

DATA : BEGIN OF ITAB OCCURS 0,
          VAR(5000),
       END OF ITAB.

DATA : V_STR TYPE STRING VALUE '0000123,123456,345677'.

CLEAR ITAB.
REFRESH ITAB.

SPLIT V_STR AT ',' INTO TABLE ITAB.

CLEAR ITAB.
REFRESH IT_RANGE.

LOOP AT ITAB.
  IT_RANGE-SIGN = 'I'.
  IT_RANGE-OPTION = 'BT'.
  IT_RANGE-LOW = ITAB-VAR.
  IT_RANGE-HIGH = ''.
  APPEND IT_RANGE.
  CLEAR IT_RANGE.
ENDLOOP.

LOOP AT IT_RANGE.
  WRITE : / IT_RANGE-LOW.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 02:22:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-split-a-long-text/m-p/1517308#M237979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T02:22:35Z</dc:date>
    </item>
  </channel>
</rss>

