<?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 Add Text in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510705#M1066802</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;The requirement I'm working with requires to add text to the existing text object. I used READ_TEXT to read the existing text and SAVE_TEXT to append the additional text. There is a scenario where there might be no text in the text object. In this case the FM READ_TEXT fails and the program stops at that point. Is there any way we can check if there is already some text in a text object so that only in that case we can use FM READ_TEXT else we just use SAVE_TEXT to append new text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;ALAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Sep 2008 18:35:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-29T18:35:02Z</dc:date>
    <item>
      <title>Add Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510705#M1066802</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;The requirement I'm working with requires to add text to the existing text object. I used READ_TEXT to read the existing text and SAVE_TEXT to append the additional text. There is a scenario where there might be no text in the text object. In this case the FM READ_TEXT fails and the program stops at that point. Is there any way we can check if there is already some text in a text object so that only in that case we can use FM READ_TEXT else we just use SAVE_TEXT to append new text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;ALAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2008 18:35:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510705#M1066802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-29T18:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Add Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510706#M1066803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read data from STXH. if no record then use SAVE_TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2008 18:49:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510706#M1066803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-29T18:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510707#M1066804</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;&amp;gt; &lt;EM&gt;In this case the FM READ_TEXT fails and the program stops at that point.&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;Do you mean if there is no text the READ_TEXT FM goes for a Short dump??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check if there is a text exist, you have to use READ_TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can jus go without checking sy-subrc or your itab is initial after the READ_TEXT stmt, let the code pass through both the FM all the time you run.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2008 18:50:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510707#M1066804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-29T18:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Add Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510708#M1066805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Senthil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you mean if there is no text the READ_TEXT FM goes for a Short dump?? - It does not dump but it stops at an error message inside the READ_TEXT FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;ALAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2008 18:54:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510708#M1066805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-29T18:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Add Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510709#M1066806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  to check if the text exists just use FM READ_TEXT. If there is no text, the FM will raise exception NOT_FOUND which you catch via subrc code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it is just enough to use case of subrc after call of the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If subrc is 0 then text exists, then just edit table with text and use SAVE_TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If text doesn't exitst - I don't know which value of subrc is it now (you will get it when you use pattern button) then first call INIT_TEXT and then SAVE_TEXT (or you can use CREATE_TEXT - but this is not working properly in some cases because of COMMIT inside the body).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Karol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Karol Seman on Sep 29, 2008 8:55 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2008 18:54:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510709#M1066806</guid>
      <dc:creator>karol_seman</dc:creator>
      <dc:date>2008-09-29T18:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Add Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510710#M1066807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Muthappan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you mean to say if there exists an entry in STXH then only use READ_TEXT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ALAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2008 18:56:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510710#M1066807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-29T18:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Add Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510711#M1066808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to include the exception NOT_FOUND in your call to FM READ_TEXT. Then you will be able to check sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2008 19:13:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-text/m-p/4510711#M1066808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-29T19:13:07Z</dc:date>
    </item>
  </channel>
</rss>

