<?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 inner join query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-query/m-p/3299864#M789899</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;I want to query a inner join via some tools in sap GUI. till now, i could not query a inner join between two tables via SE11. can someone tell are there some other ways to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any response will be awarded!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards,&lt;/P&gt;&lt;P&gt;samson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jan 2008 05:56:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-24T05:56:24Z</dc:date>
    <item>
      <title>inner join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-query/m-p/3299864#M789899</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;I want to query a inner join via some tools in sap GUI. till now, i could not query a inner join between two tables via SE11. can someone tell are there some other ways to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any response will be awarded!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards,&lt;/P&gt;&lt;P&gt;samson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 05:56:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-query/m-p/3299864#M789899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T05:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: inner join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-query/m-p/3299865#M789900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;samson,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You use SQ02 and SQ01 tcodes to inner join to tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more detaisls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step-by-step guide for creating ABAP query&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ab4query.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ab4query.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After query development &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execute the query (SQ01) then goto tcode SE38--&amp;gt;display(F7).&lt;/P&gt;&lt;P&gt;No need to enter program name automaticaaly when you execute the query it will show the program name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In code you can find inner join created by program....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 06:17:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-query/m-p/3299865#M789900</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T06:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: inner join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-query/m-p/3299866#M789901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi samson,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proper use of Inner Join&lt;/P&gt;&lt;P&gt;When multiple SAP tables are logically joined, it is always advisable to use inner join to read the data from them. This certainly reduces the load on the network. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us take an example of 2 tables, zairln and zflight. The table zairln has the field airln, which is the airline code and the field lnnam, which is the name of the airline. The table zflight has the field airln, the airline code and other fields which hold the details of the flights that an airline operates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since these 2 tables a re logically joined by the airln field, it is advisable to use the inner join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             Select a&lt;SUB&gt;airln a&lt;/SUB&gt;lnnam b&lt;SUB&gt;fligh b&lt;/SUB&gt;cntry into table int_airdet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example 2:--&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner join: If you have common fields between 2 or more tables, its betterto use Inner join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below example:&lt;/P&gt;&lt;P&gt;VBAK &amp;amp; VBAP table has common fields, hence we can use inner join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a&lt;SUB&gt;kunnr a&lt;/SUB&gt;vbeln a&lt;SUB&gt;netwr a&lt;/SUB&gt;bnddt a~knumv&lt;/P&gt;&lt;P&gt;a&lt;SUB&gt;vkbur a&lt;/SUB&gt;erdat a&lt;SUB&gt;vdatu a&lt;/SUB&gt;augru&lt;/P&gt;&lt;P&gt;a&lt;SUB&gt;ktext b&lt;/SUB&gt;matnr b&lt;SUB&gt;arktx b&lt;/SUB&gt;kwmeng b~kzwi6&lt;/P&gt;&lt;P&gt;b&lt;SUB&gt;volum b&lt;/SUB&gt;posnr b~kdmat&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE g_t_quot&lt;/P&gt;&lt;P&gt;FROM vbak AS a INNER JOIN vbap 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;WHERE a~vbeln IN so_vbeln&lt;/P&gt;&lt;P&gt;AND a~trvog ='2'&lt;/P&gt;&lt;P&gt;AND a~vkorg IN so_vkorg&lt;/P&gt;&lt;P&gt;AND a~vtweg IN so_vtweg&lt;/P&gt;&lt;P&gt;AND a~vkbur IN so_vkbur&lt;/P&gt;&lt;P&gt;AND a~audat IN so_audat&lt;/P&gt;&lt;P&gt;AND a~kunnr IN so_kunag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES:&lt;/P&gt;&lt;P&gt;If you get some data into one internal table and if you want to fetch data from other table based on it, use FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;g_t_quot is an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT spras augru bezei FROM tvaut INTO TABLE g_t_tvaut&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN g_t_quot&lt;/P&gt;&lt;P&gt;WHERE augru = g_t_quot-augru AND spras = sy-langu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            From zairln as a inner join zflight as b on a&lt;SUB&gt;airln = b&lt;/SUB&gt;airln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; In order to restrict the data as per the selection criteria, a where clause can be added to the above inner join.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 06:27:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-query/m-p/3299866#M789901</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T06:27:27Z</dc:date>
    </item>
  </channel>
</rss>

