<?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 WITH FOR ALL ENTRIES in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938335#M942333</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ABAP - Keyword Documentation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With duplicated rows in the resulting set, the addition FOR ALL ENTRIES has the same effect as if addition DISTINCT were specified in the definition of the selection quantity. Unlike DISTINCT, the rows are not deleted from the database system but are deleted on the application server from the resulting set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Nov 2011 12:01:37 GMT</pubDate>
    <dc:creator>renato_parise</dc:creator>
    <dc:date>2011-11-15T12:01:37Z</dc:date>
    <item>
      <title>PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938325#M942323</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;i have a problem with for all entries, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the selection screen i will enter that s_bukrs.&lt;/P&gt;&lt;P&gt;from the bkpf table a document number will be picked and for that document number i have &lt;/P&gt;&lt;P&gt;2 entries in the bseg table. but when i am doing for all entries its picking only one recOrd from the TABLE BSEG. CAN YOU TELL ME WHAT IS THE REASON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MY LOGIC IS AS BELOW..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   SELECT gjahr belnr budat&lt;/P&gt;&lt;P&gt;   FROM bkpf&lt;/P&gt;&lt;P&gt;   INTO TABLE i_bkpf&lt;/P&gt;&lt;P&gt;   WHERE bukrs IN s_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;     SELECT bukrs belnr shkzg dmbtr matnr&lt;/P&gt;&lt;P&gt;       INTO TABLE i_bseg&lt;/P&gt;&lt;P&gt;  FROM bseg&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN i_bkpf&lt;/P&gt;&lt;P&gt;  WHERE bukrs IN s_bukrs AND&lt;/P&gt;&lt;P&gt;        belnr EQ i_bkpf-belnr AND&lt;/P&gt;&lt;P&gt;        gjahr EQ i_bkpf-gjahr AND&lt;/P&gt;&lt;P&gt;        hkont IN s_saknr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS,&lt;/P&gt;&lt;P&gt;sURESH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 12:45:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938325#M942323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T12:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938326#M942324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to replace:&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_bkpf&lt;/P&gt;&lt;P&gt;WHERE bukrs IN s_bukrs AND&lt;/P&gt;&lt;P&gt;belnr EQ i_bkpf-belnr AND&lt;/P&gt;&lt;P&gt;gjahr EQ i_bkpf-gjahr AND&lt;/P&gt;&lt;P&gt;hkont IN s_saknr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_bkpf&lt;/P&gt;&lt;P&gt;WHERE belnr EQ i_bkpf-belnr AND&lt;/P&gt;&lt;P&gt;gjahr EQ i_bkpf-gjahr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW: Did you check in table BSEG also for HKONT, maybe problem lies there and not in your coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Micky Oestreich on May 27, 2008 2:50 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 12:50:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938326#M942324</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-05-27T12:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938327#M942325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you filling the select-options s_saknr? If you fill it, will be returned only one entry (depending of the type of FI document, normally the accounts are diferent for each record in BSEG).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 12:51:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938327#M942325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T12:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938328#M942326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David Pietroniro ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the GL account also same in BSEG table. so it should pick right ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 12:55:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938328#M942326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T12:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938329#M942327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suresh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT bukrs belnr shkzg dmbtr matnr&lt;/P&gt;&lt;P&gt;INTO TABLE i_bseg&lt;/P&gt;&lt;P&gt;FROM bseg&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_bkpf&lt;/P&gt;&lt;P&gt;WHERE &lt;STRONG&gt;bukrs IN s_bukrs&lt;/STRONG&gt; AND&lt;/P&gt;&lt;P&gt;belnr EQ i_bkpf-belnr AND&lt;/P&gt;&lt;P&gt;gjahr EQ i_bkpf-gjahr AND&lt;/P&gt;&lt;P&gt;hkont IN s_saknr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think problem is in where clause because you are again using bukrs IN s_bukrs, when you already have filtered data in i_bkpf according to bukrs, then there is no need for it again. one more thing you have three conditions to be validate apart from bukrs. belnr, gjahr, hkont, there mey be possibility either of the conditions does not match with 2 values data and query is getting failed to extract as you exactly want. Please check first with only:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT bukrs belnr shkzg dmbtr matnr&lt;/P&gt;&lt;P&gt;INTO TABLE i_bseg&lt;/P&gt;&lt;P&gt;FROM bseg&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_bkpf&lt;/P&gt;&lt;P&gt;WHERE belnr EQ i_bkpf-belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you get both the entries or as required. then do changes accordingly.&lt;/P&gt;&lt;P&gt;Rewards if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Alok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 12:58:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938329#M942327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T12:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938330#M942328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi suresh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. First do a minor change (bold)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;SELECT bukrs belnr shkzg dmbtr matnr&lt;/P&gt;&lt;P&gt;INTO TABLE i_bseg&lt;/P&gt;&lt;P&gt;FROM bseg&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_bkpf&lt;/P&gt;&lt;P&gt;WHERE bukrs &lt;STRONG&gt;EQ i_bkpf-bukrs&lt;/STRONG&gt; AND&lt;/P&gt;&lt;P&gt;belnr EQ i_bkpf-belnr AND&lt;/P&gt;&lt;P&gt;gjahr EQ i_bkpf-gjahr AND&lt;/P&gt;&lt;P&gt;hkont IN s_saknr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Check now whether the records are coming OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. If not then for checking purpose,&lt;/P&gt;&lt;P&gt;   simply remove the HKONT condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 13:00:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938330#M942328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T13:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938331#M942329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your problem is that FOR ALL ENTRIES eliminates duplicate entries. Simply add BUZEI to the second select (and add BUKRS to the first one):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT bukrs gjahr belnr budat
  FROM bkpf
  INTO CORRESPONDING FIELDS OF TABLE i_bkpf
  WHERE bukrs IN s_bukrs.

IF sy-subrc EQ 0.
  SELECT bukrs belnr buzei shkzg dmbtr matnr
  INTO CORRESPONDING FIELDS OF TABLE i_bseg
  FROM bseg
  FOR ALL ENTRIES IN i_bkpf
  WHERE bukrs EQ i_bkpf-bukrs AND
  belnr EQ i_bkpf-belnr AND
  gjahr EQ i_bkpf-gjahr AND
  hkont IN s_saknr.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 14:06:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938331#M942329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T14:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938332#M942330</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;  The simple reason why you are getting one entry instead two entries in BSEG table is might the selected fields have same values in BSEG table. Which means you can retrieve all the key fields even it is not using in your program, becasue the for all entries works like SELECT and Delete adjacent duplicates statements. So the fields which you retrieved has duplicate entries, so one record get delete from your table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to add some more fields (All key fields) in your select query, then your problem will be solved....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to change the select like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select bukrs belnr GJAHR BUZEI shkzg dmbtr matnr&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujji&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bujji on May 27, 2008 4:15 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 14:13:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938332#M942330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T14:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938333#M942331</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>Tue, 15 Nov 2011 05:25:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938333#M942331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-15T05:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938334#M942332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for all entries feature gets only unique value from the database so you might get single row,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 05:59:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938334#M942332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-15T05:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938335#M942333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ABAP - Keyword Documentation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With duplicated rows in the resulting set, the addition FOR ALL ENTRIES has the same effect as if addition DISTINCT were specified in the definition of the selection quantity. Unlike DISTINCT, the rows are not deleted from the database system but are deleted on the application server from the resulting set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 12:01:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938335#M942333</guid>
      <dc:creator>renato_parise</dc:creator>
      <dc:date>2011-11-15T12:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM WITH FOR ALL ENTRIES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938336#M942334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even though this thread is 4 years old, it saved me.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 17:37:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-for-all-entries/m-p/3938336#M942334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-11T17:37:54Z</dc:date>
    </item>
  </channel>
</rss>

