<?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: regarding do loop. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-do-loop/m-p/924687#M59609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ambi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't you accept my advice to integrate the field&lt;/P&gt;&lt;P&gt;HKONT in your where-clause of your select-statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="307247"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think , this will solve your performance problem &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another tip: to reduce the accounts in bsis and bsas you can &lt;/P&gt;&lt;P&gt;first select table glt0. If here's no entry you can exclude &lt;/P&gt;&lt;P&gt;the account from your select of bsis/bsas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Mar 2005 07:17:13 GMT</pubDate>
    <dc:creator>andreas_mann3</dc:creator>
    <dc:date>2005-03-29T07:17:13Z</dc:date>
    <item>
      <title>regarding do loop.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-do-loop/m-p/924685#M59607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey guys&lt;/P&gt;&lt;P&gt;i have two questions.&lt;/P&gt;&lt;P&gt;1-Does the IN usage in Select query wont retrieve(see) index from table(ie.only = opertion will take index in query?)&lt;/P&gt;&lt;P&gt;    SELECT BELNR BUZEI BLART MONAT MWSKZ HKONT SHKZG DMBTR&lt;/P&gt;&lt;P&gt;   INTO CORRESPONDING FIELDS OF TABLE ITAB_TMP_BSIS1&lt;/P&gt;&lt;P&gt;    FROM BSIS&lt;/P&gt;&lt;P&gt;   WHERE BUKRS = ITAB_T001-BUKRS AND&lt;/P&gt;&lt;P&gt;         GJAHR = P_GJAHR AND&lt;/P&gt;&lt;P&gt;         MONAT IN R_MONAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2-I have do loop like this. where inside subroutine&lt;/P&gt;&lt;P&gt;i have few internal tables restricting values with respect to wk_monat.&lt;/P&gt;&lt;P&gt;(does this way of work takes more time in performance?,do we have any best way for this.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; do.&lt;/P&gt;&lt;P&gt;     perform frm_read_data.         " RE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   wk_monat = wk_monat + 1.&lt;/P&gt;&lt;P&gt;   if wk_monat &amp;gt; p_monat.&lt;/P&gt;&lt;P&gt;     exit.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt; enddo.&lt;/P&gt;&lt;P&gt;ambichan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: ambi chan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: ambi chan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2005 01:56:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-do-loop/m-p/924685#M59607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-29T01:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: regarding do loop.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-do-loop/m-p/924686#M59608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ambi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your first query, a few points on indexing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) Indexing is based on the fields of the table and as far as my knowledge goes, one does not have to worry about the "compounding" clauses like AND, OR, NOT as long as field itself is present.(Someone correct me if I am mistaken here). So if your table is indexed on the following fields BUKRS, GJAHR and MONAT as the keys, then there is nothing to worry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) For your second part of the query, a few memory cycles are increased based on your coding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might as well, write:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
while wk_monat &amp;lt; p_monat.

perform frm_read_data.
add 1 to wk_monat.

endwhile.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Easier to understand ,simple to code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Subramanian V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2005 05:15:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-do-loop/m-p/924686#M59608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-29T05:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: regarding do loop.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-do-loop/m-p/924687#M59609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ambi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't you accept my advice to integrate the field&lt;/P&gt;&lt;P&gt;HKONT in your where-clause of your select-statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="307247"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think , this will solve your performance problem &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another tip: to reduce the accounts in bsis and bsas you can &lt;/P&gt;&lt;P&gt;first select table glt0. If here's no entry you can exclude &lt;/P&gt;&lt;P&gt;the account from your select of bsis/bsas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2005 07:17:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-do-loop/m-p/924687#M59609</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-03-29T07:17:13Z</dc:date>
    </item>
  </channel>
</rss>

