<?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 select ... for all entries . in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887253#M372057</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;As mentioned by Rob..WHen you are using FOR ALL ENTRIES..You have to give the key fields of the table VBPA..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT &amp;lt;b&amp;gt;VBELN&lt;/P&gt;&lt;P&gt;POSNR&lt;/P&gt;&lt;P&gt;PARVW&lt;/P&gt;&lt;P&gt;kunnr&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt; FROM vbpa INTO CORRESPONDING FIELDS OF TABLE i_vbpa&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN i_vbak&lt;/P&gt;&lt;P&gt;  WHERE vbeln = i_vbak-vbeln AND&lt;/P&gt;&lt;P&gt;               parvw = &amp;lt;b&amp;gt;'WE'&amp;lt;/b&amp;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;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jan 2007 16:44:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-19T16:44:34Z</dc:date>
    <item>
      <title>Problem with select ... for all entries .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887249#M372053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the piece of code I have developed .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;date1 = sy-datum - 89 .
date2 = sy-datum .

  SELECT vbeln FROM vbak INTO CORRESPONDING FIELDS OF TABLE i_vbak
  WHERE erdat &amp;gt;= date1 AND
        erdat &amp;lt;= sy-datum  AND
        vkorg IN s_vkorg .

  CHECK sy-subrc EQ 0 .

  SELECT kunnr FROM vbpa INTO CORRESPONDING FIELDS OF TABLE i_vbpa
  FOR ALL ENTRIES IN i_vbak
  WHERE vbeln = i_vbak-vbeln AND
               parvw = 'SH'  .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given the criteria , the first select gets 439 records from the table VBAK which matches with the count from the table VBAK .  The second select for all entries retuns sy-subrc as 4 where as I expect it should return 438 records from vbpa as per the given criteria . Can anyone please explaoi me where I am going wrong on the select statement .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Daniel .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2007 16:27:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887249#M372053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-19T16:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select ... for all entries .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887250#M372054</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;Instead of SH give WE for the ship to party..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT kunnr FROM vbpa INTO CORRESPONDING FIELDS OF TABLE i_vbpa&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN i_vbak&lt;/P&gt;&lt;P&gt;  WHERE vbeln = i_vbak-vbeln AND&lt;/P&gt;&lt;P&gt;               parvw = '&amp;lt;b&amp;gt;WE&amp;lt;/b&amp;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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2007 16:30:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887250#M372054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-19T16:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select ... for all entries .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887251#M372055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FOR ALL ENTRIES gets rid of duplicate entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So modify i_vbpa and:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT vbeln posnr parvw kunnr &lt;/P&gt;&lt;P&gt;  FROM vbpa &lt;/P&gt;&lt;P&gt;  INTO CORRESPONDING FIELDS OF TABLE i_vbpa&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN i_vbak&lt;/P&gt;&lt;P&gt;  WHERE vbeln = i_vbak-vbeln&lt;/P&gt;&lt;P&gt;    AND parvw = 'SH'  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2007 16:34:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887251#M372055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-19T16:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select ... for all entries .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887252#M372056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narendra ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is returning some values , after giving "WE"  instead of "SH" . But it is not matching with the record count form VBPA . I made a select on VBPA and I expect to get 438 records but it is giving only 123 entries . One thing I can observe is duplicates are not there in internal table . Can you please let me know what the issue could be .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Daniel .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2007 16:35:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887252#M372056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-19T16:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select ... for all entries .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887253#M372057</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;As mentioned by Rob..WHen you are using FOR ALL ENTRIES..You have to give the key fields of the table VBPA..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT &amp;lt;b&amp;gt;VBELN&lt;/P&gt;&lt;P&gt;POSNR&lt;/P&gt;&lt;P&gt;PARVW&lt;/P&gt;&lt;P&gt;kunnr&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt; FROM vbpa INTO CORRESPONDING FIELDS OF TABLE i_vbpa&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN i_vbak&lt;/P&gt;&lt;P&gt;  WHERE vbeln = i_vbak-vbeln AND&lt;/P&gt;&lt;P&gt;               parvw = &amp;lt;b&amp;gt;'WE'&amp;lt;/b&amp;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;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2007 16:44:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887253#M372057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-19T16:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select ... for all entries .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887254#M372058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever u r using for all entries always u should select all the&amp;lt;b&amp;gt; key&amp;lt;/b&amp;gt; of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So select all the key fields of vbpa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful reward.&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2007 16:51:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-for-all-entries/m-p/1887254#M372058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-19T16:51:29Z</dc:date>
    </item>
  </channel>
</rss>

