<?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 Convert STRING into SOLI_TAB in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-into-soli-tab/m-p/479566#M15733</link>
    <description>&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;I want to read a text (&amp;gt;255) from my TextEdit and convert it into a SOLI_TAB for sending it via mail.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; go_editor-&amp;gt;get_textstream(
 IMPORTING
 text = l_text ).

 cl_gui_cfw=&amp;gt;flush( ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is how I get the String from my TextEdit. Now I tried some methods/functions to convert the String into SOLI_TAB (SO_STRING_TO_TAB, SCMS_STRING_TO_FTEXT, cl_document_bcs=&amp;gt;string_to_soli). Now the problem is.. there is always a text break because the text is &amp;gt;255 characters.&lt;/P&gt;&lt;P&gt;I decieded to write my own method:&lt;/P&gt;&lt;P&gt;-----------------------------------------------------&lt;/P&gt;&lt;P&gt;  l_string = i_string.&lt;BR /&gt;  l_do_run = abap_true.&lt;BR /&gt;  l_do_check = abap_true.&lt;/P&gt;&lt;P&gt;  WHILE l_do_run = abap_true.&lt;/P&gt;&lt;P&gt;  IF l_do_check = abap_true.&lt;BR /&gt;  IF strlen( l_string ) &amp;gt; 255.&lt;BR /&gt;  l_string_work = l_string(255).&lt;BR /&gt;  l_string = l_string+255.&lt;BR /&gt;  ELSE.&lt;BR /&gt;  l_string_work = l_string.&lt;BR /&gt;  clear l_string.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;  l_do_check = abap_false.&lt;BR /&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  FIND FIRST OCCURRENCE OF REGEX '##+' IN l_string_work RESULTS l_result RESPECTING CASE.&lt;BR /&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;BR /&gt;  IF l_string IS INITIAL.&lt;BR /&gt;  ls_soli-line = l_string_work.&lt;BR /&gt;  APPEND ls_soli TO rt_soli.&lt;BR /&gt;  l_do_run = abap_false.&lt;BR /&gt;  EXIT.&lt;BR /&gt;  ELSE.&lt;BR /&gt;  l_string = |{ l_string_work }{ l_string }|.&lt;BR /&gt;  l_do_check = abap_true.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;  l_length = l_result-offset + l_result-length.&lt;BR /&gt;  ls_soli-line = l_string_work(l_length).&lt;BR /&gt;  l_string_work = l_string_work+l_length.&lt;BR /&gt;  APPEND ls_soli TO rt_soli.&lt;BR /&gt;  CLEAR: ls_soli, l_result.&lt;BR /&gt;  ENDWHILE.&lt;/P&gt;&lt;P&gt;--------------------------------------&lt;/P&gt;&lt;P&gt;The problem ist now: this method is working when I test it (even when I put strings &amp;gt; 255), but it doesn't work when I use it with the string that I get from the TextEdit.&lt;/P&gt;&lt;P&gt;I'm always getting sy-subrc = 4, why I try to get the first occourence of regex '##+' (it works with the exactly same text, when I run the method in test-mode).&lt;/P&gt;&lt;P&gt; I don't know why and I can't solve the problme.&lt;/P&gt;&lt;P&gt;Can you guys please help me with this? Either tell me how to avoid the break with the Standard functions/methods, or how to Change my code to make it work with the string from TextEdit.&lt;/P&gt;&lt;P&gt;Please help! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2017 09:45:48 GMT</pubDate>
    <dc:creator>former_member569700</dc:creator>
    <dc:date>2017-03-14T09:45:48Z</dc:date>
    <item>
      <title>Convert STRING into SOLI_TAB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-into-soli-tab/m-p/479566#M15733</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;I want to read a text (&amp;gt;255) from my TextEdit and convert it into a SOLI_TAB for sending it via mail.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; go_editor-&amp;gt;get_textstream(
 IMPORTING
 text = l_text ).

 cl_gui_cfw=&amp;gt;flush( ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is how I get the String from my TextEdit. Now I tried some methods/functions to convert the String into SOLI_TAB (SO_STRING_TO_TAB, SCMS_STRING_TO_FTEXT, cl_document_bcs=&amp;gt;string_to_soli). Now the problem is.. there is always a text break because the text is &amp;gt;255 characters.&lt;/P&gt;&lt;P&gt;I decieded to write my own method:&lt;/P&gt;&lt;P&gt;-----------------------------------------------------&lt;/P&gt;&lt;P&gt;  l_string = i_string.&lt;BR /&gt;  l_do_run = abap_true.&lt;BR /&gt;  l_do_check = abap_true.&lt;/P&gt;&lt;P&gt;  WHILE l_do_run = abap_true.&lt;/P&gt;&lt;P&gt;  IF l_do_check = abap_true.&lt;BR /&gt;  IF strlen( l_string ) &amp;gt; 255.&lt;BR /&gt;  l_string_work = l_string(255).&lt;BR /&gt;  l_string = l_string+255.&lt;BR /&gt;  ELSE.&lt;BR /&gt;  l_string_work = l_string.&lt;BR /&gt;  clear l_string.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;  l_do_check = abap_false.&lt;BR /&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  FIND FIRST OCCURRENCE OF REGEX '##+' IN l_string_work RESULTS l_result RESPECTING CASE.&lt;BR /&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;BR /&gt;  IF l_string IS INITIAL.&lt;BR /&gt;  ls_soli-line = l_string_work.&lt;BR /&gt;  APPEND ls_soli TO rt_soli.&lt;BR /&gt;  l_do_run = abap_false.&lt;BR /&gt;  EXIT.&lt;BR /&gt;  ELSE.&lt;BR /&gt;  l_string = |{ l_string_work }{ l_string }|.&lt;BR /&gt;  l_do_check = abap_true.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;  l_length = l_result-offset + l_result-length.&lt;BR /&gt;  ls_soli-line = l_string_work(l_length).&lt;BR /&gt;  l_string_work = l_string_work+l_length.&lt;BR /&gt;  APPEND ls_soli TO rt_soli.&lt;BR /&gt;  CLEAR: ls_soli, l_result.&lt;BR /&gt;  ENDWHILE.&lt;/P&gt;&lt;P&gt;--------------------------------------&lt;/P&gt;&lt;P&gt;The problem ist now: this method is working when I test it (even when I put strings &amp;gt; 255), but it doesn't work when I use it with the string that I get from the TextEdit.&lt;/P&gt;&lt;P&gt;I'm always getting sy-subrc = 4, why I try to get the first occourence of regex '##+' (it works with the exactly same text, when I run the method in test-mode).&lt;/P&gt;&lt;P&gt; I don't know why and I can't solve the problme.&lt;/P&gt;&lt;P&gt;Can you guys please help me with this? Either tell me how to avoid the break with the Standard functions/methods, or how to Change my code to make it work with the string from TextEdit.&lt;/P&gt;&lt;P&gt;Please help! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 09:45:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-into-soli-tab/m-p/479566#M15733</guid>
      <dc:creator>former_member569700</dc:creator>
      <dc:date>2017-03-14T09:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Convert STRING into SOLI_TAB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-into-soli-tab/m-p/479567#M15734</link>
      <description>&lt;P&gt;Would it not have been easier to use method GET_TEXT_AS_R3TABLE in the initial step?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 10:41:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-into-soli-tab/m-p/479567#M15734</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2017-03-14T10:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert STRING into SOLI_TAB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-into-soli-tab/m-p/479568#M15735</link>
      <description>&lt;P&gt;Oh well.. that worked &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;BR /&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 11:09:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-into-soli-tab/m-p/479568#M15735</guid>
      <dc:creator>former_member569700</dc:creator>
      <dc:date>2017-03-14T11:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Convert STRING into SOLI_TAB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-into-soli-tab/m-p/479569#M15736</link>
      <description>&lt;P&gt;You should understand that when you see # in the debugger (or in other output), that is often just the way SAP represents a non-printable character. Therefore REPLACE ... '##' ... won't work, since the string you're actually after (in this case, probably CR and LF) isn't actually ##, although you see it like that. You can represent these characters using the constants found in class cl_abap_char_utilities. E.g. &lt;/P&gt;&lt;P&gt;FIND FIRST OCCURRENCE OF cl_abap_char_utilities=&amp;gt;cr_lf IN l_string_work RESULTS l_result RESPECTING CASE.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 12:00:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-into-soli-tab/m-p/479569#M15736</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-03-14T12:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Convert STRING into SOLI_TAB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-into-soli-tab/m-p/479570#M15737</link>
      <description>&lt;P&gt;Instead of ## you must most probably use a string template like |\r\n| which stands for the code of CRLF, see &lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abencl_abap_char_utilities.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abencl_abap_char_utilities.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 17:14:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-into-soli-tab/m-p/479570#M15737</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-03-14T17:14:58Z</dc:date>
    </item>
  </channel>
</rss>

