<?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: Performance wise which one is better: loop inside select single or select outside loop and reading inside loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-wise-which-one-is-better-loop-inside-select-single-or-select/m-p/9078306#M1704096</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Moderator message : There are several discussions already available to related topics. Please search for it in SCN. Do the performance analysis yourself using the various transactions available in SAP( please search for it again ).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2012 07:58:37 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2012-10-19T07:58:37Z</dc:date>
    <item>
      <title>Performance wise which one is better: loop inside select single or select outside loop and reading inside loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-wise-which-one-is-better-loop-inside-select-single-or-select/m-p/9078305#M1704095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;Hi All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;I am having code like shown below...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;loop at it_vbeln.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="l0s52"&gt;SELECT * FROM vbfa&amp;nbsp; WHERE vbeln &lt;/SPAN&gt;&lt;SPAN class="l0s55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="l0s52"&gt;it_vbeln&lt;/SPAN&gt;&lt;SPAN class="l0s70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="l0s52"&gt;vbeln&lt;/SPAN&gt;&lt;SPAN class="l0s55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="l0s52"&gt;SELECT SINGLE * FROM vbkd WHERE vbeln &lt;/SPAN&gt;&lt;SPAN class="l0s55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="l0s52"&gt;vbfa&lt;/SPAN&gt;&lt;SPAN class="l0s70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="l0s52"&gt;vbelv.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&lt;SPAN class="l0s52"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;endloop.&lt;/SPAN&gt;﻿&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;whether can i use the select statements outside the loop?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;select VBELN&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; POSNR&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KDGRP&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PLTYP&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;from vbfa&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;into table it_vbfa&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;for all entries in it_vbeln&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;where vbeln = it_vbeln-vbeln.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;after that...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;loop at it_vbeln.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;read table it_vbfa into wa_vbaf with key vbeln = it_vbeln-vbeln.&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;endloop.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;Which one is better&lt;STRONG style="font-family: 'Arial','sans-serif';"&gt;....inside loop select single is better or use select outside the loop and read the table&lt;/STRONG&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;But when i seen the execution time &lt;STRONG style="font-family: 'Arial','sans-serif';"&gt;select single inside loop is taking less time as compared with select outside loop and reading inside loop&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;Please advise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 07:50:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-wise-which-one-is-better-loop-inside-select-single-or-select/m-p/9078305#M1704095</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-19T07:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Performance wise which one is better: loop inside select single or select outside loop and reading inside loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-wise-which-one-is-better-loop-inside-select-single-or-select/m-p/9078306#M1704096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Moderator message : There are several discussions already available to related topics. Please search for it in SCN. Do the performance analysis yourself using the various transactions available in SAP( please search for it again ).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 07:58:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-wise-which-one-is-better-loop-inside-select-single-or-select/m-p/9078306#M1704096</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-10-19T07:58:37Z</dc:date>
    </item>
  </channel>
</rss>

