<?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: Error while reading the Long text Using READ_TEXT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686716#M1292393</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; All of your Answers are very helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Xavier.P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jun 2009 14:31:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-05T14:31:31Z</dc:date>
    <item>
      <title>Error while reading the Long text Using READ_TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686711#M1292388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now I am working with Smartforms.While I am reading the Long text of the material using function module READ_TEXT  I am getting the following error if the text is not there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUT_PURCH_PO ID GRUN language EN not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should not get this error Instead I should get the blank value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUT_PURCH_PO   -  my material name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF WA_EKPO-KNTTP = 'F' AND WA_MTART-MTART = 'ZMSC'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   READ TABLE IT_SGTXT INTO WA_SGTXT WITH KEY MATNR = WA_EKPO-MATNR.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WA_EKPO-TXZ01 = WA_SGTXT-SGTXT.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     NAME = WA_EKPO-MATNR.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'READ_TEXT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;         CLIENT            = SY-MANDT&lt;/P&gt;&lt;P&gt;         ID                =  ID &lt;/P&gt;&lt;P&gt;         LANGUAGE          =  SY-LANGU&lt;/P&gt;&lt;P&gt;         NAME              =  NAME  &lt;/P&gt;&lt;P&gt;         OBJECT            =  OBJECT&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        HEADER            =  THEAD&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;         LINES             =  LTEXT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 13:42:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686711#M1292388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-05T13:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reading the Long text Using READ_TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686712#M1292389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xavier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess you need to handle exceptions also in the FM.&lt;/P&gt;&lt;P&gt;Please call the FM READ_TEXT using pattern and uncomment the exceptions so that they can be caught.&lt;/P&gt;&lt;P&gt;When no text is found, handle the sy-subrc (i guess it should be 4) and perform the desired operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saumya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 13:56:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686712#M1292389</guid>
      <dc:creator>saumya_govil</dc:creator>
      <dc:date>2009-06-05T13:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reading the Long text Using READ_TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686713#M1292390</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;I think you are getting the message because you are not treating the exception. After the call to the function, try intercepting the result, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE SY-SUBRC .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.... code for error treatment (or not)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&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;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 13:56:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686713#M1292390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-05T13:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reading the Long text Using READ_TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686714#M1292391</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;PRE&gt;&lt;CODE&gt;

CALL FUNCTION 'READ_TEXT'
  EXPORTING
    client                  = sy-mandt
    id                      = id
    language                = sy-langu
    name                    = name
    object                  = object
  TABLES
    lines                   = ltext
  EXCEPTIONS                           " --&amp;gt; have this 
    id                      = 1
    language                = 2
    name                    = 3
    not_found               = 4
    object                  = 5
    reference_check         = 6
    wrong_access_to_archive = 7
    OTHERS                  = 8.
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.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Avinash Kodarapu on Jun 5, 2009 7:32 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 14:00:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686714#M1292391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-05T14:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reading the Long text Using READ_TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686715#M1292392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Xavier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because you have no handled the exceptions of the the FM. Try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = ID 
LANGUAGE = SY-LANGU
NAME = NAME 
OBJECT = OBJECT
* IMPORTING
* HEADER = THEAD
TABLES
LINES = LTEXT
   EXCEPTIONS
     ID                            = 1
     LANGUAGE                      = 2
     NAME                          = 3
     NOT_FOUND                     = 4
     OBJECT                        = 5
     REFERENCE_CHECK               = 6
     WRONG_ACCESS_TO_ARCHIVE       = 7
     OTHERS                        = 8.
IF sy-subrc = 0.
" --&amp;gt; Work with the table LTEXT here.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 14:01:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686715#M1292392</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-06-05T14:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reading the Long text Using READ_TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686716#M1292393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; All of your Answers are very helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Xavier.P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 14:31:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-reading-the-long-text-using-read-text/m-p/5686716#M1292393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-05T14:31:31Z</dc:date>
    </item>
  </channel>
</rss>

