<?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 Read statement in loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862823#M1686331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you solve by yourself, then how do you solve the issue? Post here your solution for future reference of other SCN member. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/825/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; Lastly, don't forget to close this thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jake&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jul 2012 05:51:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-07-12T05:51:15Z</dc:date>
    <item>
      <title>Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862813#M1686321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Guru's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem in read statement in loop. Let us say i have 10 records in internal table say it_vbap. I am populating the values using loop. in that loop i am reading the same it_vbap for some logic. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 1st iteration data is coming in proper way, for 2nr iteration also data is coming. For 3rd iteration i am comparing with 2nd record's value and if it is satisfy then i am reading 2nd record for some data. So here after printing 2nd record values i have to print 3rd record and continuously but here i am getting 2nd record values and jumps into 4th record values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am missing 3rd record values. Please help me how to resolve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Muralikrishna Peravali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 08:06:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862813#M1686321</guid>
      <dc:creator>former_member267445</dc:creator>
      <dc:date>2012-07-09T08:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862814#M1686322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using loop condition based on some condition?&lt;/P&gt;&lt;P&gt;Can you paste your code of this part?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 08:40:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862814#M1686322</guid>
      <dc:creator>gouravkumar64</dc:creator>
      <dc:date>2012-07-09T08:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862815#M1686323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope you are using INDEX to fetch data from your table. that should work fine, post your code in case it is not.&lt;/P&gt;&lt;P&gt;If you are using WITH KEY for the inner read table, you will always get first record that satisfies the criteria.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 08:41:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862815#M1686323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-09T08:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862816#M1686324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Muralikrishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems this is is a prbolem of handling Index. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you process one record, your Index must have been incremented by then and perhaps for that reason you might be loosing your 3rd Record to be displayed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check from that angle too.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Kumar Saurav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 08:46:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862816#M1686324</guid>
      <dc:creator>former_member186491</dc:creator>
      <dc:date>2012-07-09T08:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862817#M1686325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_tab into wa_itab.&lt;/P&gt;&lt;P&gt;lv_index = sy-tabix + 1.&lt;/P&gt;&lt;P&gt;Read table it_tab with key lv_index.&amp;nbsp; '2nd entry&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;Lokesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 08:49:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862817#M1686325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-09T08:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862818#M1686326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 13:25:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862818#M1686326</guid>
      <dc:creator>former_member267445</dc:creator>
      <dc:date>2012-07-09T13:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862819#M1686327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chinmay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not using the index to fetch the data. Please find the attachment so that you will know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Muralikrishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 13:27:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862819#M1686327</guid>
      <dc:creator>former_member267445</dc:creator>
      <dc:date>2012-07-09T13:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862820#M1686328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saurav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not using index in loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 13:30:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862820#M1686328</guid>
      <dc:creator>former_member267445</dc:creator>
      <dc:date>2012-07-09T13:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862821#M1686329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Every READ statement will set the following system variables ( and many more &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote jiveImage" src="https://community.sap.com/825/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; )&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;SY-INDEX&amp;nbsp;&amp;nbsp; - Contains the number of loop passes, including the current loop pass&lt;/P&gt;&lt;P&gt;SY-TABIX&amp;nbsp;&amp;nbsp; - Current row index&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Since you have used, READ TABLE with KEY, you cannot guarantee that the records will be read in sequence and I believe this is the issue. &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;If you want to check / compare data in internal tables, you can use the option &lt;STRONG&gt;COMPARING / TRANSPORTING NO FIELDS.&lt;/STRONG&gt; If you specify NO FIELDS, no fields are transported this statement only fills the system fields sy-subrc and sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pseudo code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab into wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; READ TABLE itab1 INTO wa1 WITH KEY aaaa = wa-bbbb.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; READ TABLE itab2 INTO wa2 WITH KEY cccc = wa-1-aaaa.&amp;nbsp; &amp;lt;&amp;lt;&amp;lt; SY-TABIX will change again &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Shyam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 14:07:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862821#M1686329</guid>
      <dc:creator>ShyamPindiproli</dc:creator>
      <dc:date>2012-07-09T14:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862822#M1686330</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;Thankyou for your informations. But my self resolve the issue. Thank you for all supports&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 13:01:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862822#M1686330</guid>
      <dc:creator>former_member267445</dc:creator>
      <dc:date>2012-07-11T13:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862823#M1686331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you solve by yourself, then how do you solve the issue? Post here your solution for future reference of other SCN member. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/825/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; Lastly, don't forget to close this thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jake&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 05:51:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862823#M1686331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-12T05:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Read statement in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862824#M1686332</link>
      <description>&lt;P&gt;how you resolved this issue i am also facing the same problem kindly help me to resolved this issue??????&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 05:09:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement-in-loop/m-p/8862824#M1686332</guid>
      <dc:creator>former_member770121</dc:creator>
      <dc:date>2021-11-23T05:09:18Z</dc:date>
    </item>
  </channel>
</rss>

