<?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 FM to split a string into multiple table lines in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946186#M64256</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;  In the past i used a FM to convert a long string (or sequence of chars) into multiple table lines (rel. 4.6C)&lt;/P&gt;&lt;P&gt;Import param:&lt;/P&gt;&lt;P&gt;- string (or chars?)&lt;/P&gt;&lt;P&gt;- length of output lines&lt;/P&gt;&lt;P&gt;Export param:&lt;/P&gt;&lt;P&gt;- standard table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't remember what FM it was. Could anyone help me ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance !&lt;/P&gt;&lt;P&gt;Manuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Sep 2005 14:40:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-09-21T14:40:17Z</dc:date>
    <item>
      <title>FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946186#M64256</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;  In the past i used a FM to convert a long string (or sequence of chars) into multiple table lines (rel. 4.6C)&lt;/P&gt;&lt;P&gt;Import param:&lt;/P&gt;&lt;P&gt;- string (or chars?)&lt;/P&gt;&lt;P&gt;- length of output lines&lt;/P&gt;&lt;P&gt;Export param:&lt;/P&gt;&lt;P&gt;- standard table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't remember what FM it was. Could anyone help me ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance !&lt;/P&gt;&lt;P&gt;Manuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2005 14:40:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946186#M64256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-21T14:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946187#M64257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out FORMAT_TEXTLINES.&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>Wed, 21 Sep 2005 14:43:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946187#M64257</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-09-21T14:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946188#M64258</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;SPLIT_LINE is the fm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2005 14:43:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946188#M64258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-21T14:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946189#M64259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich and Sri,&lt;/P&gt;&lt;P&gt;  I tried to use the FM you suggested but I dont think they are useful in this case (or maybe i have made a mistake calling the FM).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORMAT_TEXTLINES: i can't pass any string parameter&lt;/P&gt;&lt;P&gt;SPLIT_LINE: im passing TEXT, LEN and MAXLEN but it seems that it doesn't split anything&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I make an example to clarify my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I have a very long sring : var_1(1000) type c&lt;/P&gt;&lt;P&gt;2. I need to split this string in string with max length=50&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. the result should be an internal table of strings with 1000/50= 20 lines and length=50 chars.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions ?&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Manuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2005 15:02:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946189#M64259</guid>
      <dc:creator>manuel_bassani</dc:creator>
      <dc:date>2005-09-21T15:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946190#M64260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can pass your string in the LINES table of the FORMAT_TEXTLINES, can't you ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2005 15:11:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946190#M64260</guid>
      <dc:creator>guillaume-hrc</dc:creator>
      <dc:date>2005-09-21T15:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946191#M64261</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;  You need to fill LEN as well as MAXLEN..&lt;/P&gt;&lt;P&gt;  LEN should be the length of your string..&lt;/P&gt;&lt;P&gt;  Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  It works for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Pass '' for SEP_BEFORE and SEP_BEHIND and COMMENT if you dont need them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sri&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2005 15:13:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946191#M64261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-21T15:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946192#M64262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try Function SOTR_SERV_STRING_TO_TABLE&lt;/P&gt;&lt;P&gt;Pass TEXT &amp;amp; LINE LENGTH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2005 15:25:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946192#M64262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-21T15:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946193#M64263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all (and really thanks for your help)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Guillaume:&lt;/P&gt;&lt;P&gt;  I think i can't use LINES table.&lt;/P&gt;&lt;P&gt;Unfortunately this table has a structure with length 132 and I need to pass very long strings (1000 chars or more).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Sri:&lt;/P&gt;&lt;P&gt;Maybe im passing something wrong...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: text(1000),
      begin of tab occurs 0,
      text(10),
      end of tab.

text = 'aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeee'.
call function 'SPLIT_LINE'
  exporting
    text                   = text
    len                    = 10
    maxlen                 = 10
   SEP_BEFORE             = ''
   SEP_BEHIND             = ''
   COMMENT                = ''
  tables
    result_tab             = tab.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at this point table TAB contains&lt;/P&gt;&lt;P&gt;aaaaaaaaaa&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of:&lt;/P&gt;&lt;P&gt;aaaaaaaaaa&lt;/P&gt;&lt;P&gt;bbbbbbbbbb&lt;/P&gt;&lt;P&gt;cccccccccc&lt;/P&gt;&lt;P&gt;dddddddddd&lt;/P&gt;&lt;P&gt;eeeeeeeeee&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2005 15:32:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946193#M64263</guid>
      <dc:creator>manuel_bassani</dc:creator>
      <dc:date>2005-09-21T15:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946194#M64264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you pass the text in the TABLES parameter.  Please implement the following example program.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0002 .

data: lines type table of tline with header line.



lines-tdline = 'These are the lines that you want to be formatted.  '.
append lines.
lines-tdline = 'You can have as many lines as you want.'.
append lines.



call function 'FORMAT_TEXTLINES'
 exporting
*   CURSOR_COLUMN           = 0
*   CURSOR_LINE             = 0
*   ENDLINE                 = 99999
    formatwidth             = 20
*   LINEWIDTH               = 132
*   STARTLINE               = 1
*   LANGUAGE                = SY-LANGU
* IMPORTING
*   NEW_CURSOR_COLUMN       =
*   NEW_CURSOR_LINE         =
  tables
    lines                   = lines
* EXCEPTIONS
*   BOUND_ERROR             = 1
*   OTHERS                  = 2
          .
if sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.

loop at lines.

  write:/ lines-tdline.
endloop.

&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>Wed, 21 Sep 2005 15:32:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946194#M64264</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-09-21T15:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946195#M64265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanjay ,&lt;/P&gt;&lt;P&gt;It works ! Thank you !!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2005 15:33:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946195#M64265</guid>
      <dc:creator>manuel_bassani</dc:creator>
      <dc:date>2005-09-21T15:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946196#M64266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manuel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len should be really the length of the entire text..&lt;/P&gt;&lt;P&gt;use STRLEN function and then pass it as LEN..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2005 15:34:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946196#M64266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-21T15:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: FM to split a string into multiple table lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946197#M64267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While FM SOTR_SERV_STRING_TO_TABLE works, &lt;STRONG&gt;it has an internal maximum string length of 255 characters&lt;/STRONG&gt;! This is because it uses data element SOTR_TXT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 12:24:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-split-a-string-into-multiple-table-lines/m-p/946197#M64267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-10T12:24:37Z</dc:date>
    </item>
  </channel>
</rss>

