<?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: Problem with get_text_as_stream in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317939#M1637024</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;I got the solution...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it was a silly mistakes... &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/777/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 May 2012 14:22:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-05-30T14:22:15Z</dc:date>
    <item>
      <title>Problem with get_text_as_stream</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317933#M1637018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a PR Clarification mail sending program. The Program has a text editor where the user can type his query and also button for adding attachment on the same screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this I am using the function module get_text_as_stream which I am calling through the object of the class cl_gui_textedit. Through this method I am reading the text which the user types in the screen and then sending it via mail.I have added pushbutton for attaching files. On click of this push button I call the 'F4_FILENAME' function to get the file name and then GUI_UPLOAD to upload the file to a separate internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD new_text-&amp;gt;get_text_as_stream&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      only_when_modified     = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      text                   = it_mail&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     is_modified            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      error_dp               = 1&lt;/P&gt;&lt;P&gt;      error_cntl_call_method = 2&lt;/P&gt;&lt;P&gt;      OTHERS                 = 3&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program works fine when I am not attaching any files. It reads the texts properly in the internal table. But the problem is when I try to attach files. When the file is attached the file gets loaded properly and is also sent via mail but the mail text which is typed in text editor is not read at all. The result is that I get a blank mail with the attached file and the text is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have checked the above code in the debug  mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When no attachments are given the internal table it_mail gets populated with the data from the screen. But when I upload the attachment the internal table IT_MAIL remains blank though the sy-subrc becomes zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: abap4kirti on Nov 18, 2011 6:43 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: abap4kirti on Nov 18, 2011 6:45 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 05:41:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317933#M1637018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-18T05:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with get_text_as_stream</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317934#M1637019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the Exporting parameter make &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only_when_modified = true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and see if it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 06:12:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317934#M1637019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-18T06:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with get_text_as_stream</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317935#M1637020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply.&lt;/P&gt;&lt;P&gt;But initially that parameter was set to true only. It didnt work which is why I made it false but still no data is fetched. &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 06:21:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317935#M1637020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-18T06:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with get_text_as_stream</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317936#M1637021</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;When you are attaching the file,the contents of the text editor are cleared since it is leaving the screen.For this everytime you perform the file upload,before 'F4_FILENAME' ,save the data to the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We had a similar problem that when user attached a file on custom screen and navigates to/fro ,the data disappears &lt;/P&gt;&lt;P&gt;Solution : We saved the data into internal table by reading it from screen and used the set_text to put the data back from internal table to screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it Helps, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Nov 2011 12:15:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317936#M1637021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-19T12:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with get_text_as_stream</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317937#M1637022</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;If that issue is not solved yet, please provide the code used to send the email...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;Manu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 10:18:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317937#M1637022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-22T10:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with get_text_as_stream</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317938#M1637023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am also facing similor kind of problem,&lt;/P&gt;&lt;P&gt;can you please tell me how you solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Problem is &lt;/P&gt;&lt;P&gt;"I am using this FM in Modulepool screen, when the first time the PAI is called the FM is reading the text correctly but it is not reading the TEXT for next times"&lt;/P&gt;&lt;P&gt;I tried with both the options only_when_modified = true and false.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 11:34:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317938#M1637023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-30T11:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with get_text_as_stream</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317939#M1637024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;I got the solution...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it was a silly mistakes... &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/777/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 14:22:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317939#M1637024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-30T14:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with get_text_as_stream</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317940#M1637025</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;Please, what's the solution?&lt;/P&gt;&lt;P&gt;Thank's.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 21:17:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-text-as-stream/m-p/8317940#M1637025</guid>
      <dc:creator>former_member537945</dc:creator>
      <dc:date>2022-09-08T21:17:52Z</dc:date>
    </item>
  </channel>
</rss>

