<?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 select for many table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012348#M958655</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 want select all  postes orders &lt;/P&gt;&lt;P&gt;that have:&lt;/P&gt;&lt;P&gt;- vbap-matnr in s_matnr&lt;/P&gt;&lt;P&gt;-vbak-vbtyp = ' c'&lt;/P&gt;&lt;P&gt;-vbep-edatu in s_erdat&lt;/P&gt;&lt;P&gt;-vbuk-lfstk &amp;lt;&amp;gt;' '&lt;/P&gt;&lt;P&gt;-orders existe in VBFA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have you  a good source for that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: yassine82 on Jun 13, 2008 12:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jun 2008 10:08:17 GMT</pubDate>
    <dc:creator>adil</dc:creator>
    <dc:date>2008-06-13T10:08:17Z</dc:date>
    <item>
      <title>select for many table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012348#M958655</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 want select all  postes orders &lt;/P&gt;&lt;P&gt;that have:&lt;/P&gt;&lt;P&gt;- vbap-matnr in s_matnr&lt;/P&gt;&lt;P&gt;-vbak-vbtyp = ' c'&lt;/P&gt;&lt;P&gt;-vbep-edatu in s_erdat&lt;/P&gt;&lt;P&gt;-vbuk-lfstk &amp;lt;&amp;gt;' '&lt;/P&gt;&lt;P&gt;-orders existe in VBFA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have you  a good source for that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: yassine82 on Jun 13, 2008 12:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 10:08:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012348#M958655</guid>
      <dc:creator>adil</dc:creator>
      <dc:date>2008-06-13T10:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: select for many table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012349#M958656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from vbak as a join vbep as b&lt;/P&gt;&lt;P&gt;on a&lt;SUB&gt;vbeln = b&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;join vbuk as c&lt;/P&gt;&lt;P&gt;on b&lt;SUB&gt;vbeln = c&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;where a~matnr in s_matnr and&lt;/P&gt;&lt;P&gt;         a~vbtyp = ' c' and&lt;/P&gt;&lt;P&gt;         b~edatu in s_erdat and&lt;/P&gt;&lt;P&gt;         c~-lfstk  eq ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 10:15:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012349#M958656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T10:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: select for many table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012350#M958657</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;Put a join on the tables from which you want to select the data.&lt;/P&gt;&lt;P&gt;To Put a join the pre requisite is that there should be some fields in common between tables,&lt;/P&gt;&lt;P&gt;In your case for VBAK/VBEP there are common fields. So go ahead and put join on these tables. You will get the required results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check the syntax, do F1 help on key word INNER JOIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lalit Kabra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 10:20:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012350#M958657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T10:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: select for many table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012351#M958658</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;you can do it  using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Joins as explained in the above post. Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. FOR ALL ENTRIES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use second option as it has better performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;- Rishika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 10:21:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012351#M958658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T10:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: select for many table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012352#M958659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can write For all entries using Primaary keys of each table sequencially.&lt;/P&gt;&lt;P&gt;select matnr&lt;/P&gt;&lt;P&gt;from vabp&lt;/P&gt;&lt;P&gt;into -i_vbap&lt;/P&gt;&lt;P&gt;where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i_vabp is not initial&lt;/P&gt;&lt;P&gt;sort i_vabp by vbeln.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr&lt;/P&gt;&lt;P&gt;from vbak&lt;/P&gt;&lt;P&gt;into table i_vbak&lt;/P&gt;&lt;P&gt;for all entries in i_vbap&lt;/P&gt;&lt;P&gt;where matnr = i_vbap-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so on....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if this is useful for you , please assign points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 10:23:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012352#M958659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T10:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: select for many table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012353#M958660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Make use of join statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from vbak  join  vbep &lt;/P&gt;&lt;P&gt;on vbak&lt;SUB&gt;vbeln = vbep&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;join vbuk &lt;/P&gt;&lt;P&gt;on vbep&lt;SUB&gt;vbeln = vbuk&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where vbak~matnr in s_matnr and&lt;/P&gt;&lt;P&gt;vbak~vbtyp = ' c' and&lt;/P&gt;&lt;P&gt;vbep~edatu in s_erdat and&lt;/P&gt;&lt;P&gt; vbuk~-lfstk eq ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 10:32:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012353#M958660</guid>
      <dc:creator>former_member195383</dc:creator>
      <dc:date>2008-06-13T10:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: select for many table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012354#M958661</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;Try this piece of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~vbeln&lt;/P&gt;&lt;P&gt;               a~matnr&lt;/P&gt;&lt;P&gt;               a~posnr&lt;/P&gt;&lt;P&gt;               b~lfstk&lt;/P&gt;&lt;P&gt;               c~vbtyp&lt;/P&gt;&lt;P&gt;               d~edatu&lt;/P&gt;&lt;P&gt;            FROM vbap AS a JOIN vbuk AS b&lt;/P&gt;&lt;P&gt;                  ON a&lt;SUB&gt;vbeln =  b&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;              JOIN vbak AS c&lt;/P&gt;&lt;P&gt;                  ON b&lt;SUB&gt;vbeln = c&lt;/SUB&gt; vbeln&lt;/P&gt;&lt;P&gt;              JOIN vbep AS d&lt;/P&gt;&lt;P&gt;                  ON c&lt;SUB&gt;vbeln = d&lt;/SUB&gt; vbeln&lt;/P&gt;&lt;P&gt;         INTO TABLE itab&lt;/P&gt;&lt;P&gt;        WHERE  a~matnr   IN s_matnr&lt;/P&gt;&lt;P&gt;         AND    b~lfstk  =  u2018u2019&lt;/P&gt;&lt;P&gt;         AND    c~vbtyp  = u2018Cu2019 &lt;/P&gt;&lt;P&gt;         AND    d~edatu  IN s_erdat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can even do the other way round by selecting the data from one table then using for all entries of above select  for other select statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dhanashri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 10:45:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-for-many-table/m-p/4012354#M958661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T10:45:16Z</dc:date>
    </item>
  </channel>
</rss>

