<?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: Inner Join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462844#M1057575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~ebeln&lt;/P&gt;&lt;P&gt;a~bsart&lt;/P&gt;&lt;P&gt;a~aedat&lt;/P&gt;&lt;P&gt;a~ekorg&lt;/P&gt;&lt;P&gt;a~ekgrp&lt;/P&gt;&lt;P&gt;a~inco1&lt;/P&gt;&lt;P&gt;a~ernam&lt;/P&gt;&lt;P&gt;a~knumv&lt;/P&gt;&lt;P&gt;a~exnum&lt;/P&gt;&lt;P&gt;b~ebelp&lt;/P&gt;&lt;P&gt;b~menge&lt;/P&gt;&lt;P&gt;b~txz01&lt;/P&gt;&lt;P&gt;FROM ekko AS a&lt;/P&gt;&lt;P&gt;INNER JOIN ekpo AS b&lt;/P&gt;&lt;P&gt;ON b&lt;SUB&gt;ebeln EQ a&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;INTO TABLE gt_ekko&lt;/P&gt;&lt;P&gt;WHERE &lt;STRONG&gt;a~&lt;/STRONG&gt;ebeln IN s_ebeln&lt;/P&gt;&lt;P&gt;AND &lt;STRONG&gt;a~&lt;/STRONG&gt;bsart IN s_bsart&lt;/P&gt;&lt;P&gt;AND a~aedat IN s_aedat&lt;/P&gt;&lt;P&gt;AND a~ekorg IN s_ekorg&lt;/P&gt;&lt;P&gt;AND a~ekgrp IN s_ekgrp&lt;/P&gt;&lt;P&gt;AND a~ernam IN s_ernam&lt;/P&gt;&lt;P&gt;AND zdat01 IN s_zdat01&lt;/P&gt;&lt;P&gt;AND loekz = SPACE&lt;/P&gt;&lt;P&gt;AND elikz = SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly for other fields u hv to gove the table name....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Sep 2008 07:13:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-12T07:13:29Z</dc:date>
    <item>
      <title>Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462837#M1057568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi people,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement where i have to fetch data from 2 table EKKO and EKPO for which the common field is EBELN. I want to use inner join for these tables. So, I have given EBELN field in the join condition. I also need to give a condition in the WHERE clause saying EBELN in EBELN value in the selection-screen parameter. Since we have 2 conditions given for the same field i.e., EBELN, it gives an error. How would I overcome this problem having in mind that both the conditions must be satisfied.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2008 06:37:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462837#M1057568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-12T06:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462838#M1057569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt; In the where clause you can give condition for twice.&lt;/P&gt;&lt;P&gt;i hope it may not throw you error.&lt;/P&gt;&lt;P&gt;i did id once.&lt;/P&gt;&lt;P&gt;check it once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2008 06:39:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462838#M1057569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-12T06:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462839#M1057570</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;YOUR SYNTAX WILL BE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT  (field list as EKKO~ OR EKPO~)
  INTO  CORRESPONDING FIELDS OF TABLE itab
  FROM  ( ( ekko
            INNER JOIN EKPO  ON ekko~VBELN = ekPo~VBELN    )
  WHERE FIELD NAME1 IN SELECTOPTION1
    AND FIELD NAME2 IN SELECTOPTION2&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For detail concept , check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb39c4358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb39c4358411d1829f0000e829fbfe/content.htm&lt;/A&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;Anirban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2008 06:40:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462839#M1057570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-12T06:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462840#M1057571</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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;f1 b&lt;/SUB&gt;f2&lt;/P&gt;&lt;P&gt;          into table itab&lt;/P&gt;&lt;P&gt;         from EKKO as a inner join EKPO as b&lt;/P&gt;&lt;P&gt;         on a&lt;SUB&gt;EBELN  eq  b&lt;/SUB&gt;EBELN &lt;/P&gt;&lt;P&gt;         where &lt;STRONG&gt;a~EBELN&lt;/STRONG&gt;    in   EBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try your code by specifying a or b ebeln in the where 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;Sharin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2008 06:44:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462840#M1057571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-12T06:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462841#M1057572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;use table name in where clause.&lt;/P&gt;&lt;P&gt;below is sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: ekko,ekpo.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_ebeln like ekko-ebeln.&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;      ebeln like ekko-ebeln,&lt;/P&gt;&lt;P&gt;      ebelp like ekpo-ebelp,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select ekko&lt;SUB&gt;ebeln ekpo&lt;/SUB&gt;ebelp into TABLE itab&lt;/P&gt;&lt;P&gt;        from ekko INNER JOIN ekpo on&lt;/P&gt;&lt;P&gt;        ekko&lt;SUB&gt;ebeln = ekpo&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;        where ekko~ebeln = p_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        loop at itab.&lt;/P&gt;&lt;P&gt;          write:/ itab-ebeln,itab-ebelp.&lt;/P&gt;&lt;P&gt;          endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2008 06:49:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462841#M1057572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-12T06:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462842#M1057573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mentioning EBELN both in join condition and in Where condition is giving an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just take a look at what i have done:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~ebeln&lt;/P&gt;&lt;P&gt;         a~bsart&lt;/P&gt;&lt;P&gt;         a~aedat&lt;/P&gt;&lt;P&gt;         a~ekorg&lt;/P&gt;&lt;P&gt;         a~ekgrp&lt;/P&gt;&lt;P&gt;         a~inco1&lt;/P&gt;&lt;P&gt;         a~ernam&lt;/P&gt;&lt;P&gt;         a~knumv&lt;/P&gt;&lt;P&gt;         a~exnum&lt;/P&gt;&lt;P&gt;         b~ebelp&lt;/P&gt;&lt;P&gt;         b~menge&lt;/P&gt;&lt;P&gt;         b~txz01&lt;/P&gt;&lt;P&gt;          FROM ekko AS a&lt;/P&gt;&lt;P&gt;    INNER JOIN ekpo AS b&lt;/P&gt;&lt;P&gt;            ON b&lt;SUB&gt;ebeln EQ a&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;          INTO TABLE gt_ekko&lt;/P&gt;&lt;P&gt;         WHERE ebeln IN s_ebeln&lt;/P&gt;&lt;P&gt;           AND bsart IN s_bsart&lt;/P&gt;&lt;P&gt;           AND aedat IN s_aedat&lt;/P&gt;&lt;P&gt;           AND ekorg IN s_ekorg&lt;/P&gt;&lt;P&gt;           AND ekgrp IN s_ekgrp&lt;/P&gt;&lt;P&gt;           AND ernam IN s_ernam&lt;/P&gt;&lt;P&gt;           AND zdat01 IN s_zdat01&lt;/P&gt;&lt;P&gt;           AND loekz = SPACE&lt;/P&gt;&lt;P&gt;           AND elikz = SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives an error saying EBELN has 2 conditions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2008 06:56:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462842#M1057573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-12T06:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462843#M1057574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the where condition you did not mention which ebeln should be considered. that is from which table it should take and compare.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2008 06:59:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462843#M1057574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-12T06:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462844#M1057575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~ebeln&lt;/P&gt;&lt;P&gt;a~bsart&lt;/P&gt;&lt;P&gt;a~aedat&lt;/P&gt;&lt;P&gt;a~ekorg&lt;/P&gt;&lt;P&gt;a~ekgrp&lt;/P&gt;&lt;P&gt;a~inco1&lt;/P&gt;&lt;P&gt;a~ernam&lt;/P&gt;&lt;P&gt;a~knumv&lt;/P&gt;&lt;P&gt;a~exnum&lt;/P&gt;&lt;P&gt;b~ebelp&lt;/P&gt;&lt;P&gt;b~menge&lt;/P&gt;&lt;P&gt;b~txz01&lt;/P&gt;&lt;P&gt;FROM ekko AS a&lt;/P&gt;&lt;P&gt;INNER JOIN ekpo AS b&lt;/P&gt;&lt;P&gt;ON b&lt;SUB&gt;ebeln EQ a&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;INTO TABLE gt_ekko&lt;/P&gt;&lt;P&gt;WHERE &lt;STRONG&gt;a~&lt;/STRONG&gt;ebeln IN s_ebeln&lt;/P&gt;&lt;P&gt;AND &lt;STRONG&gt;a~&lt;/STRONG&gt;bsart IN s_bsart&lt;/P&gt;&lt;P&gt;AND a~aedat IN s_aedat&lt;/P&gt;&lt;P&gt;AND a~ekorg IN s_ekorg&lt;/P&gt;&lt;P&gt;AND a~ekgrp IN s_ekgrp&lt;/P&gt;&lt;P&gt;AND a~ernam IN s_ernam&lt;/P&gt;&lt;P&gt;AND zdat01 IN s_zdat01&lt;/P&gt;&lt;P&gt;AND loekz = SPACE&lt;/P&gt;&lt;P&gt;AND elikz = SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly for other fields u hv to gove the table name....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2008 07:13:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/4462844#M1057575</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-12T07:13:29Z</dc:date>
    </item>
  </channel>
</rss>

