<?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 in using read statement. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082741#M432235</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Weird...How is you internal table defined???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2007 16:03:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-28T16:03:05Z</dc:date>
    <item>
      <title>problem in using read statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082740#M432234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am using the read statement as follows :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table tekpo with key werks = '1001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is not reading the corresponding record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;though it reads or not it is returning the sy-subrc value 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz let me know why it is happening as soon as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be awarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 15:58:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082740#M432234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T15:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using read statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082741#M432235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Weird...How is you internal table defined???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 16:03:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082741#M432235</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T16:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using read statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082742#M432236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this..&lt;/P&gt;&lt;P&gt;sort tekpo by werks.&lt;/P&gt;&lt;P&gt;read table tekpo with key werks = '1001'&lt;/P&gt;&lt;P&gt;                                     binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 16:04:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082742#M432236</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2007-03-28T16:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using read statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082743#M432237</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 READ statement looks good..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table tekpo with key werks = '1001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sy-subrc will be 0 only if it finds a corresponding record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want all the records??what exactly is your requirement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 16:05:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082743#M432237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T16:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using read statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082744#M432238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas rao,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this example program and make the changes in your program as well:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF LINE,&lt;/P&gt;&lt;P&gt;         COL1 TYPE I,&lt;/P&gt;&lt;P&gt;         COL2 TYPE I,&lt;/P&gt;&lt;P&gt;      END OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;FS&amp;gt; LIKE LINE OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 4 TIMES.&lt;/P&gt;&lt;P&gt;  LINE-COL1 = SY-INDEX.&lt;/P&gt;&lt;P&gt;  LINE-COL2 = SY-INDEX ** 2.&lt;/P&gt;&lt;P&gt;  APPEND LINE TO ITAB.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB WITH TABLE KEY COL1 = 2 ASSIGNING &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;lt;FS&amp;gt;-COL2 = 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB WITH TABLE KEY COL1 = 3 ASSIGNING &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;DELETE ITAB INDEX 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF &amp;lt;FS&amp;gt; IS ASSIGNED.&lt;/P&gt;&lt;P&gt;  WRITE '&amp;lt;FS&amp;gt; is assigned!'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB ASSIGNING &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;  WRITE: / &amp;lt;FS&amp;gt;-COL1, &amp;lt;FS&amp;gt;-COL2.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         1         1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         2       100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         4        16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you have satisfied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;Vipin Das&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 16:24:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082744#M432238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T16:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using read statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082745#M432239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The information is not sufficient to identify the problem. Please post the data declaration of the internal table and the code around the read statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:02:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082745#M432239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T17:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using read statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082746#M432240</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;Sort your internal table by WERKS before reading it. Also use binary search addition with the read statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT tekpo BY werks.
READ TABLE tekpo
           WITH KEY werks = '1001' BINARY SEARCH.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:14:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082746#M432240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T17:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using read statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082747#M432241</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;Your read statement is correct..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc eq 0, then for sure it has got at least one record satisfying the given condition...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first check whether u are checking the Sy-subrc  immediately  after this read statement or not...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;This code onli improves the performance...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort tekpo by werks.&lt;/P&gt;&lt;P&gt;read table tekpo with key werks eq '1001' binary search.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sai ramesh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;reward all helpful answers...&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:41:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082747#M432241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T17:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using read statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082748#M432242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your syntax is correct. So there should be an other problem or misunderstanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you put more of your source ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If SY-SUBRC = 0. The program has found a record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:48:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-read-statement/m-p/2082748#M432242</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-03-28T17:48:05Z</dc:date>
    </item>
  </channel>
</rss>

