<?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 statement at fixed intervals in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230629#M1010375</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you know the position where you want to split, you can directly use offsets rather than a split statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;string1 = string+0(40).&lt;/P&gt;&lt;P&gt;string2 = string+40(40). and so on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Aug 2008 18:58:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-05T18:58:24Z</dc:date>
    <item>
      <title>SPLIT statement at fixed intervals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230628#M1010374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a SPLIT statement to break a string and throw it into an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now - the string is pipe delimited, so i m using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT string at ' |' into int_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question: If there is no pipe delimited on the string and I want to split at a fiexed interval say after every 40 characters.&lt;/P&gt;&lt;P&gt;can this be done? IF yes then how ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried SPLIT string at '+0(40)' into int_table - did not work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 18:53:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230628#M1010374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T18:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT statement at fixed intervals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230629#M1010375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you know the position where you want to split, you can directly use offsets rather than a split statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;string1 = string+0(40).&lt;/P&gt;&lt;P&gt;string2 = string+40(40). and so on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 18:58:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230629#M1010375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T18:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT statement at fixed intervals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230630#M1010376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For fixed interval, Use this FM RKD_WORD_WRAP instead of the SPLIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specify your fixed length in OUTPUTLEN parameter of FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 18:58:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230630#M1010376</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-08-05T18:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT statement at fixed intervals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230631#M1010377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Naimesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. This FM looks good but the only problem is that the input paramater TEXTLINE can take only 200 characters, whereas I will be passing a string which can have more than 200 chars. Is there any way around this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;ND.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 19:34:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230631#M1010377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T19:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT statement at fixed intervals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230632#M1010378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it has limitation to take a variables upto only 256 characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Workaround would be, copying the FM and make the changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, if you are not worrying about the "broken" words than you can go like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

L_LENGTH = 40

L_LEN = STRLEN( L_TEXT).
L_TIMES = L_LEN / L_LENGTH.
L_TIMES = L_TIMES + 1.

DO L_TIMES TIMES.
  L_STR = L_STR + L_LENGTH.
  ITAB-TEXT = L_TEXT+L_STR(L_LENGTH).
  APPPEND ITAB.
ENDDO.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 19:42:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230632#M1010378</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-08-05T19:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT statement at fixed intervals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230633#M1010379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think it's limitted to that. This seems to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztest .

DATA: txt(666).

DATA: BEGIN OF itab OCCURS 0,
        f1(35),
      END OF itab.

DO 10 TIMES.
CONCATENATE txt 'one two three four five six seven eight' INTO txt
      SEPARATED BY space.
ENDDO.

CALL FUNCTION 'RKD_WORD_WRAP'
  EXPORTING
    textline  = txt
  TABLES
    out_lines = itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 19:57:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-statement-at-fixed-intervals/m-p/4230633#M1010379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T19:57:48Z</dc:date>
    </item>
  </channel>
</rss>

