<?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: QUERY REGARDING A STATEMENT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351251#M519079</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;This is due to the error in the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever u use the for all entries u need to select all the key fields table.&lt;/P&gt;&lt;P&gt;This is the prerequiste of the FOR ALL ENTRIES&lt;/P&gt;&lt;P&gt;Check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT vbeln posnr " Check here
fkimg
INTO TABLE i_fkimg
FROM vbrp
FOR ALL ENTRIES IN invtab1
WHERE vbrp~vbeln = invtab1-vbeln
AND vbrp~pstyv = 'TAQ'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jun 2007 14:30:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-15T14:30:00Z</dc:date>
    <item>
      <title>QUERY REGARDING A STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351249#M519077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT vbeln&lt;/P&gt;&lt;P&gt;           fkimg&lt;/P&gt;&lt;P&gt;      INTO TABLE i_fkimg&lt;/P&gt;&lt;P&gt;      FROM vbrp&lt;/P&gt;&lt;P&gt;      FOR ALL ENTRIES IN invtab1&lt;/P&gt;&lt;P&gt;      WHERE vbrp~vbeln = invtab1-vbeln&lt;/P&gt;&lt;P&gt;        AND vbrp~pstyv = 'TAQ'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I AM RUNNING THIS QUERY BUT WHAT IT IS DOING IS THAT IN CASE FOR AN ORDER IF FOR TWO CONSECUTIVE LINE ITEMS IF THE VALUE OF FKIMG IS SAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITS IS PICKING ONLY ONE VALUE OUT OF THE TWO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I JUST WANTED TO KNOW WHETHER ITS IS DUE TO THE PARTNER FUNCTION(~) THAT WE ARE USING OR SOME OTHER ISSUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BECAUSE I NEED ALL THE VALUES.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 14:25:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351249#M519077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T14:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING A STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351250#M519078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes - FOR ALL ENTRIES eliminates duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can avoid this by adding posnr to your internal table.&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, 15 Jun 2007 14:28:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351250#M519078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T14:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING A STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351251#M519079</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;This is due to the error in the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever u use the for all entries u need to select all the key fields table.&lt;/P&gt;&lt;P&gt;This is the prerequiste of the FOR ALL ENTRIES&lt;/P&gt;&lt;P&gt;Check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT vbeln posnr " Check here
fkimg
INTO TABLE i_fkimg
FROM vbrp
FOR ALL ENTRIES IN invtab1
WHERE vbrp~vbeln = invtab1-vbeln
AND vbrp~pstyv = 'TAQ'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 14:30:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351251#M519079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T14:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING A STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351252#M519080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;means its due to FOR ALL ENTRIES it is not taking duplicate values not due to the partner function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;am i getting you correctly.??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if thats the case then my problem is solved..:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 14:30:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351252#M519080</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T14:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING A STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351253#M519081</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;3 major drawbacks of the "for all entries" clause:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. duplicate rows are automatically removed&lt;/P&gt;&lt;P&gt;2. if the itab used in the clause is empty , all the rows in the source table will be selected .&lt;/P&gt;&lt;P&gt;3. performance degradation when using the clause on big tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you need to use the Joins instead of the For all entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 14:31:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351253#M519081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T14:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING A STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351254#M519082</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;Change ur code like this&lt;/P&gt;&lt;P&gt;SELECT vbeln&lt;/P&gt;&lt;P&gt;fkimg&lt;/P&gt;&lt;P&gt;INTO TABLE i_fkimg&lt;/P&gt;&lt;P&gt;FROM vbrp&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN invtab1&lt;/P&gt;&lt;P&gt;WHERE vbeln = invtab1-vbeln&lt;/P&gt;&lt;P&gt;AND pstyv = 'TAQ'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward me if its helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 14:59:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351254#M519082</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T14:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING A STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351255#M519083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see how partner function is relevant here at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 15:08:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-a-statement/m-p/2351255#M519083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T15:08:18Z</dc:date>
    </item>
  </channel>
</rss>

