<?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: For all entries vs Loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796866#M913213</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   In query with FOR ALL ENTRIES,for fields ,BUKRS and GJAHR you have given SELECT OPTIONS(!) but for the select query within loop ,you have directly assigned a variable form work area,will it make a difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aravind JM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 May 2008 03:23:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-21T03:23:17Z</dc:date>
    <item>
      <title>For all entries vs Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796859#M913206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts I wonder why this two selection gives me a different result . I want to use the FOR ALL ENTRIES IN because it is much faster but it won't give me the exact result unlike LOOP or there something i don't know about FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FOR ALL ENRIES SELECTION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           SELECT&lt;/P&gt;&lt;P&gt;             BUKRS&lt;/P&gt;&lt;P&gt;             GJAHR&lt;/P&gt;&lt;P&gt;             HKONT&lt;/P&gt;&lt;P&gt;             BELNR&lt;/P&gt;&lt;P&gt;             DMBTR&lt;/P&gt;&lt;P&gt;             SHKZG&lt;/P&gt;&lt;P&gt;             ZUONR&lt;/P&gt;&lt;P&gt;             INTO CORRESPONDING FIELDS OF TABLE it_data1 FROM&lt;/P&gt;&lt;P&gt;             BSEG&lt;/P&gt;&lt;P&gt;             FOR ALL ENTRIES IN it_select&lt;/P&gt;&lt;P&gt;             WHERE bukrs IN S_BUKRS AND&lt;/P&gt;&lt;P&gt;                   GJAHR IN S_GJAHR AND&lt;/P&gt;&lt;P&gt;                   BELNR EQ it_select-BELNR AND&lt;/P&gt;&lt;P&gt;                   ZUMSK EQ SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*LOOP&lt;/P&gt;&lt;P&gt;LOOP AT it_select INTO wa_select.&lt;/P&gt;&lt;P&gt;           SELECT&lt;/P&gt;&lt;P&gt;             BSEG~BUKRS&lt;/P&gt;&lt;P&gt;             BSEG~GJAHR&lt;/P&gt;&lt;P&gt;             BSEG~HKONT&lt;/P&gt;&lt;P&gt;             BSEG~BELNR&lt;/P&gt;&lt;P&gt;             BSEG~DMBTR&lt;/P&gt;&lt;P&gt;             BSEG~SHKZG&lt;/P&gt;&lt;P&gt;             BSEG~ZUONR&lt;/P&gt;&lt;P&gt;             APPENDING CORRESPONDING FIELDS OF TABLE it_data1 FROM&lt;/P&gt;&lt;P&gt;             BSEG&lt;/P&gt;&lt;P&gt;             WHERE BSEG~bukrs EQ wa_select-BUKRS AND&lt;/P&gt;&lt;P&gt;                   BSEG~GJAHR EQ wa_select-GJAHR AND&lt;/P&gt;&lt;P&gt;                   BSEG~BELNR EQ wa_select-BELNR&lt;/P&gt;&lt;P&gt;                   AND&lt;/P&gt;&lt;P&gt;                   BSEG~ZUMSK EQ SPACE.&lt;/P&gt;&lt;P&gt;&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;Please guys guide me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 02:41:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796859#M913206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T02:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: For all entries vs Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796860#M913207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;BUKRS&lt;/P&gt;&lt;P&gt;GJAHR&lt;/P&gt;&lt;P&gt;HKONT&lt;/P&gt;&lt;P&gt;BELNR&lt;/P&gt;&lt;P&gt;DMBTR&lt;/P&gt;&lt;P&gt;SHKZG&lt;/P&gt;&lt;P&gt;ZUONR&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_data1 FROM&lt;/P&gt;&lt;P&gt;BSEG&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_select&lt;/P&gt;&lt;P&gt;WHERE bukrs EQ it_select-BUKRS AND&lt;/P&gt;&lt;P&gt;GJAHR EQ it_select-GJAHR AND&lt;/P&gt;&lt;P&gt;BELNR EQ it_select-BELNR AND&lt;/P&gt;&lt;P&gt;ZUMSK EQ SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what your other loop select is doing. if this not the result you want, you have to change the other selects where condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Aparna Shekhar on May 20, 2008 9:45 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Aparna Shekhar on May 20, 2008 9:47 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 02:45:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796860#M913207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T02:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: For all entries vs Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796861#M913208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what do you mean? but that's the only condition i have to pass...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 02:53:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796861#M913208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T02:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: For all entries vs Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796862#M913209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Before using FOR ALL ENTRIES statement,it is must to check the condition whether the internal table (in your case the internal table is 'it_select') is initial or not.If the internal table is initial,it will fetch all entries irrespective of the condition.Also while writing JOINS ,please include all key fields as selection fields.If keyfields are not included in the selection fields,duplicate entries will be truncated based on the fields given in the selection list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF it_select[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;BUKRS&lt;/P&gt;&lt;P&gt;GJAHR&lt;/P&gt;&lt;P&gt;HKONT&lt;/P&gt;&lt;P&gt;BELNR&lt;/P&gt;&lt;P&gt;DMBTR&lt;/P&gt;&lt;P&gt;SHKZG&lt;/P&gt;&lt;P&gt;ZUONR&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_data1 FROM&lt;/P&gt;&lt;P&gt;BSEG&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_select&lt;/P&gt;&lt;P&gt;WHERE bukrs IN S_BUKRS AND&lt;/P&gt;&lt;P&gt;GJAHR IN S_GJAHR AND&lt;/P&gt;&lt;P&gt;BELNR EQ it_select-BELNR AND&lt;/P&gt;&lt;P&gt;ZUMSK EQ SPACE.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aravind JM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 02:57:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796862#M913209</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T02:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: For all entries vs Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796863#M913210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the loop code how did you use the select to pull data into it_select.&lt;/P&gt;&lt;P&gt;Can you post that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 02:59:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796863#M913210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T02:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: For all entries vs Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796864#M913211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*Code for bkpf selection:&lt;/P&gt;&lt;P&gt;      SELECT&lt;/P&gt;&lt;P&gt;             BUKRS&lt;/P&gt;&lt;P&gt;             BELNR&lt;/P&gt;&lt;P&gt;             BUDAT&lt;/P&gt;&lt;P&gt;             MONAT&lt;/P&gt;&lt;P&gt;             GJAHR&lt;/P&gt;&lt;P&gt;             BLART&lt;/P&gt;&lt;P&gt;             XBLNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             INTO CORRESPONDING FIELDS OF TABLE it_select FROM&lt;/P&gt;&lt;P&gt;             BKPF WHERE BUKRS IN s_bukrs AND&lt;/P&gt;&lt;P&gt;                        BUDAT in s_budat AND&lt;/P&gt;&lt;P&gt;                        GJAHR IN s_gjahr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 03:07:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796864#M913211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T03:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: For all entries vs Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796865#M913212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yah i'm doing that in my code but the issue is that why they don't give the same results. whats on FOR ALL ENTRIES.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 03:11:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796865#M913212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T03:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: For all entries vs Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796866#M913213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   In query with FOR ALL ENTRIES,for fields ,BUKRS and GJAHR you have given SELECT OPTIONS(!) but for the select query within loop ,you have directly assigned a variable form work area,will it make a difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aravind JM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 03:23:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796866#M913213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T03:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: For all entries vs Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796867#M913214</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;Please include the field BUZEI in selection list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF it_select[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;BUKRS&lt;/P&gt;&lt;P&gt;GJAHR&lt;/P&gt;&lt;P&gt;BELNR&lt;/P&gt;&lt;P&gt;BUZEI&lt;/P&gt;&lt;P&gt;HKONT&lt;/P&gt;&lt;P&gt;DMBTR&lt;/P&gt;&lt;P&gt;SHKZG&lt;/P&gt;&lt;P&gt;ZUONR&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_data1 FROM&lt;/P&gt;&lt;P&gt;BSEG&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_select&lt;/P&gt;&lt;P&gt;WHERE bukrs IN S_BUKRS AND&lt;/P&gt;&lt;P&gt;GJAHR IN S_GJAHR AND&lt;/P&gt;&lt;P&gt;BELNR EQ it_select-BELNR AND&lt;/P&gt;&lt;P&gt;ZUMSK EQ SPACE.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aravind JM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 04:46:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796867#M913214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T04:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: For all entries vs Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796868#M913215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EXCELLENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks aravind you got it right...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 05:31:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-vs-loop/m-p/3796868#M913215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T05:31:56Z</dc:date>
    </item>
  </channel>
</rss>

