<?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: READ_TEXT issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892953#M1480280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should try it before looking elsewhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're not even testing sy-subrc before you go into the LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You really should do more debugging before posting a question here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on May 6, 2010 2:10 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 May 2010 18:09:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-05-06T18:09:00Z</dc:date>
    <item>
      <title>READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892947#M1480274</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'm trying to read gl texts into an additional field of sap query called PR.  It's working but with some problems. It's populating blank values with the previous value when there is no value. This happens until it finds a new value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i have 4 accounts for which i'm extracting text, say 111,222,333,444 where only 111 and 333 have valid texts as text1 and text2. But the script is generating output as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;111 - text1&lt;/P&gt;&lt;P&gt;222 - text1&lt;/P&gt;&lt;P&gt;333 - text2&lt;/P&gt;&lt;P&gt;444 - text2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what is wrong below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: STXL.
DATA: BEGIN OF HTEXT.
        INCLUDE STRUCTURE THEAD.
DATA: END OF HTEXT.
DATA: BEGIN OF LTEXT OCCURS 50.
        INCLUDE STRUCTURE TLINE.
DATA: END OF LTEXT.
DATA: BEGIN OF DTEXT OCCURS 50.
DATA:   MATNR LIKE PBIM-MATNR.
        INCLUDE STRUCTURE TLINE.
DATA: END OF DTEXT.
DATA: TNAME LIKE THEAD-TDNAME.
SELECT * FROM STXL WHERE TDID ='0001' AND TDSPRAS = 'E' AND TDOBJECT  = 'SKB1'.
  CONCATENATE SKB1-SAKNR SKB1-BUKRS INTO TNAME.
  CALL FUNCTION 'READ_TEXT'
       EXPORTING
*         CLIENT                  = SY-MANDT
          ID                      = '0001'
          LANGUAGE                = 'E'
          NAME                    = TNAME
          OBJECT                  = 'SKB1'
*         ARCHIVE_HANDLE          = 0
     IMPORTING
          HEADER                  = HTEXT
     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.
  LOOP AT LTEXT.
    IF LTEXT-TDLINE NE ''.
      MOVE LTEXT-TDLINE TO PR.
    ELSE.
      MOVE TNAME TO PR.
    ENDIF.
  ENDLOOP.
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Edited by: Dhimbak on May 6, 2010 6:53 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please use code tags to format your code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on May 6, 2010 1:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 16:33:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892947#M1480274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T16:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892948#M1480275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;insert &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Clear LTEXT[].&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  between accounts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 17:11:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892948#M1480275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T17:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892949#M1480276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BREAKPOINT,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It didn't work. I put the clear inside the loop after MOVE. Still same result. Pl. help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 17:26:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892949#M1480276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T17:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892950#M1480277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try REFRESH instead of CLEAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 17:49:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892950#M1480277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T17:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892951#M1480278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refresh completely erasing the LTEXT. I believe the way LTEXT is getting populated is wrong. Can you see anything wrong in passing values to the READ_TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 18:03:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892951#M1480278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T18:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892952#M1480279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't put the refresh inside the loop, put it just after the endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 18:07:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892952#M1480279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T18:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892953#M1480280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should try it before looking elsewhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're not even testing sy-subrc before you go into the LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You really should do more debugging before posting a question here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on May 6, 2010 2:10 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 18:09:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892953#M1480280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T18:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892954#M1480281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. I'm only coming here after trying myself including system variable. I'm relatively new to ABAP. Nobody would like to showcase his problems and ask for help just for the sake of it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 18:22:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892954#M1480281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T18:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892955#M1480282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gustavo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried that, but still same result. I have a feeling the internal table itself is populated incorrectly. But i'm not able to find anything wrong in the FM read_text. Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhimbak on May 6, 2010 8:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 18:30:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892955#M1480282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T18:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892956#M1480283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Thanks. I'm only coming here after trying myself including system variable. I'm relatively new to ABAP. Nobody would like to showcase his problems and ask for help just for the sake of it.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Lots of people do here and it's hard for moderators to know the difference between someone who is legitimately stumped and someone who can't be bothered to solve his or her own problem. Eventually, though the lazy ones give themselves away by the sheer quantity of lazy questions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that doesn't appear to be the case here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway - your table appears to be filled correctly with the exception of not testing the return code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But please do as I suggested before posting any more follow ups though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 18:37:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892956#M1480283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T18:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892957#M1480284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dhimbak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please debug the FM "&lt;STRONG&gt;TEXT_READ_ARCHIVE_OBJECT&lt;/STRONG&gt;" called inside the FM"&lt;STRONG&gt;READ_TEXT&lt;/STRONG&gt;", you can sort out the exact problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I strogely believe that the problem is with the READ_TEXT fm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this may help you.&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;Smart Varghese&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 May 2010 06:52:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892957#M1480284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-07T06:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892958#M1480285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dhimbak,&lt;/P&gt;&lt;P&gt;Add the following line before the CALL FUNCTION 'READ_TEXT' : &lt;/P&gt;&lt;P&gt;REFRESH LTEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add the following line before the LOOP AT LTEXT:&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;(ENDIF after the ENDLOOP line)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ana Luisa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 May 2010 08:18:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892958#M1480285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-07T08:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892959#M1480286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dhimbak, It should work now with the solution sent by Ana Luisa. If not then send me complete code for a quick response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 May 2010 08:26:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892959#M1480286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-07T08:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: READ_TEXT issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892960#M1480287</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;&lt;/P&gt;&lt;P&gt;I figured it out myself after i learnt how i can simply use other fields in SAP Query in an additional field. here is the code, hope will be useful for someone in future. Thanks all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF HDTEXT.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE THEAD.&lt;/P&gt;&lt;P&gt;DATA: END OF HDTEXT.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF LNTEXT OCCURS 50.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE TLINE.&lt;/P&gt;&lt;P&gt;DATA: END OF LNTEXT.&lt;/P&gt;&lt;P&gt;DATA: KNAME LIKE THEAD-TDNAME.&lt;/P&gt;&lt;P&gt;CONCATENATE SKB1-SAKNR SKB1-BUKRS INTO KNAME.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'READ_TEXT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    ID                      = '0001'&lt;/P&gt;&lt;P&gt;    LANGUAGE                = 'E'&lt;/P&gt;&lt;P&gt;    NAME                    = KNAME&lt;/P&gt;&lt;P&gt;    OBJECT                  = 'SKB1'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;    HEADER                  = HDTEXT&lt;/P&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;P&gt;    LINES                   = LNTEXT&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;    ID                      = 1&lt;/P&gt;&lt;P&gt;    LANGUAGE                = 2&lt;/P&gt;&lt;P&gt;    NAME                    = 3&lt;/P&gt;&lt;P&gt;    NOT_FOUND               = 4&lt;/P&gt;&lt;P&gt;    OBJECT                  = 5&lt;/P&gt;&lt;P&gt;    REFERENCE_CHECK         = 6&lt;/P&gt;&lt;P&gt;    WRONG_ACCESS_TO_ARCHIVE = 7&lt;/P&gt;&lt;P&gt;    OTHERS                  = 8.&lt;/P&gt;&lt;P&gt;MOVE '' TO LR.&lt;/P&gt;&lt;P&gt;LOOP AT LNTEXT.&lt;/P&gt;&lt;P&gt;  IF LNTEXT-TDLINE NE ''.&lt;/P&gt;&lt;P&gt;    MOVE LNTEXT-TDLINE TO LR.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;REFRESH LNTEXT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 May 2010 18:04:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-issue/m-p/6892960#M1480287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-24T18:04:48Z</dc:date>
    </item>
  </channel>
</rss>

