<?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: reading multiple records in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271477#M1831202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Apr 2014 12:29:11 GMT</pubDate>
    <dc:creator>former_member192842</dc:creator>
    <dc:date>2014-04-17T12:29:11Z</dc:date>
    <item>
      <title>reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271469#M1831194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two internal tables it_0008 and it_0035 and I have many records in first itab as well as second table&lt;/P&gt;&lt;P&gt;how to read the multiple records in second itab .&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;present code is&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp; LOOP AT it_0008 INTO wa_0008. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;now I have to loop second itab (it_0035) based on condition pernr of first itab must match with pernr with second itab and also there are multiple records present in it_0035 with same perner number&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;condition should match wa_008-pernt = it_0035 pernr&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;if we use loop inside loop there will be performance issue &lt;/P&gt;&lt;P&gt;how to solve this. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 11:33:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271469#M1831194</guid>
      <dc:creator>ABAPER_P</dc:creator>
      <dc:date>2014-04-17T11:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271470#M1831195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use parallel cursor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 11:37:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271470#M1831195</guid>
      <dc:creator>soumik_de2</dc:creator>
      <dc:date>2014-04-17T11:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271471#M1831196</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;if it is possible to make it_0035 of type sorted table with a unique key, where PERNR is the 1st key field, or to make it of type sorted table with a non-unique key PERNR the performance will increase strongly.&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;Klaus &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 11:39:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271471#M1831196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-17T11:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271472#M1831197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i don't want to use loop inside the loop&amp;nbsp; is there ant other solution . How to read the multiple records ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 11:43:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271472#M1831197</guid>
      <dc:creator>ABAPER_P</dc:creator>
      <dc:date>2014-04-17T11:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271473#M1831198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i don't want to use loop inside the loop&amp;nbsp; is there ant other solution . How to read the multiple records ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 11:43:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271473#M1831198</guid>
      <dc:creator>ABAPER_P</dc:creator>
      <dc:date>2014-04-17T11:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271474#M1831199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u elaborate how to use ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 11:44:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271474#M1831199</guid>
      <dc:creator>ABAPER_P</dc:creator>
      <dc:date>2014-04-17T11:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271475#M1831200</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;Make use of parallel cursor technique. Sample code is below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_tabix TYPE sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT IT_0008 by PERNR.&lt;/P&gt;&lt;P&gt;SORT IT_0035 by PERNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_0008 INTO WA_0008.&lt;/P&gt;&lt;P&gt;READ TABLE IT_0035 TRANSPORTING NO FIELDS WITH KEY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; PERNR = WA_0008-PERNR BINARY SEARCH&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;lv_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;LOOP AT it_0035 INTO wa_0035 FROM lv_tabix.&lt;/P&gt;&lt;P&gt;IF WA_0008-PERNR NE WA_0008-PERNR.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;Logial ABAP statements ………..&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gangadhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 11:46:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271475#M1831200</guid>
      <dc:creator>former_member223133</dc:creator>
      <dc:date>2014-04-17T11:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271476#M1831201</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;Parallel cursor is the technique to increase the performance of the program, when there are nested loops. A mandatory prerequisite before using the approach is that the internal tables are sorted by the respective key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use the code mentioned below in the thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gangadhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 11:52:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271476#M1831201</guid>
      <dc:creator>former_member223133</dc:creator>
      <dc:date>2014-04-17T11:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271477#M1831202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 12:29:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271477#M1831202</guid>
      <dc:creator>former_member192842</dc:creator>
      <dc:date>2014-04-17T12:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271478#M1831203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;READ TABLE IT_0035 will read only one record but it has multiple records with same perner &lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;8 SALY 2008.12.31 2008.01.01 2009.01.21&lt;/P&gt;&lt;P&gt;8 SALY 2009.12.31 2009.01.01 2009.08.27&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 13:01:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271478#M1831203</guid>
      <dc:creator>ABAPER_P</dc:creator>
      <dc:date>2014-04-17T13:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271479#M1831204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your mission should not be "avoid loop inside loop" but rather "avoid performance bottlenecks".&lt;/P&gt;&lt;P&gt;Try out Klaus' advice, if done correctly, it should solve the issue without complicating the code like a parallel cursor algorithm would.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 13:25:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271479#M1831204</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2014-04-17T13:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271480#M1831205</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;that read statement used to get the index number where &lt;SPAN style="color: #333333; font-size: 12px;"&gt; pernr = wa_008-pernt&amp;nbsp; matches.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;then the inside loop statement starts the loop from the respective pernr..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;no problem if ur having multiple records in it_0035.&lt;/P&gt;&lt;P&gt;you can write ur &lt;SPAN style="color: #333333; font-size: 12px;"&gt;Logial ABAP statements inside loop as gangadhar suggested.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 15:49:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271480#M1831205</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-17T15:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271481#M1831206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 16:04:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271481#M1831206</guid>
      <dc:creator>gurunathkumar_dadamu</dc:creator>
      <dc:date>2014-04-17T16:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271482#M1831207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 07:50:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271482#M1831207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-18T07:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271483#M1831208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd use a HASHED table for preference over a SORTED table. (If the key is unique and you're not using an index - which might well be what you do with parallel cursor...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 09:20:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271483#M1831208</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2014-04-18T09:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271484#M1831209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Do not use SORT and BINARY SEARCH. Use a SORTED table. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Or a HASHED one.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;These were introduced over FIFTEEN years ago. Why does everyone go on about BINARY SEARCH!&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 09:21:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271484#M1831209</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2014-04-18T09:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271485#M1831210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Thomas Zloch wrote:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Your mission should not be "avoid loop inside loop" but rather "avoid performance bottlenecks".&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Try out Klaus' advice, if done correctly, it should solve the issue without complicating the code like a parallel cursor algorithm would.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you understand that? It is entirely correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 09:22:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271485#M1831210</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2014-04-18T09:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: reading multiple records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271486#M1831211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;Matthew Billingham wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I'd use a HASHED table for preference over a SORTED table. (If the key is unique)&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have been using HASHED tables of late as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes i miss the index operations which i could do on SORTED tables, e.g., deleting inside the loop. I'm sure i'll get more comfortable as i continue to use them.&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, 18 Apr 2014 09:27:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-multiple-records/m-p/10271486#M1831211</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2014-04-18T09:27:45Z</dc:date>
    </item>
  </channel>
</rss>

