<?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/2917695#M686993</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Rajeev.&lt;/P&gt;&lt;P&gt;EKKO,EKPO and EKET are Purchase Orders Tables,I found the relationship between them.&lt;/P&gt;&lt;P&gt;EKPO(Purchasing Document Item) includes Purchasing Doc(EBELN),Item(EBELP).&lt;/P&gt;&lt;P&gt;EKKO(Purchasing Document Header) includes Purchasing Doc(EBELN).&lt;/P&gt;&lt;P&gt;EKET(Delivery Schedules) includes Purchasing Doc(EBELN),Item(EBELP),Delivery Schedule(ETENR).&lt;/P&gt;&lt;P&gt;You can inner join three tables based this relationship.And I think it's no need to join three tables,because EKPO&lt;SUB&gt;EBELN is PO number, EKPO&lt;/SUB&gt;EBELP is item no,EKPO&lt;SUB&gt;ZZITEM1 is matnr,and EKPO&lt;/SUB&gt;NETPR is Price.Am I right?If there is something wrong,please reply me.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;feng.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Oct 2007 01:30:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-23T01:30:47Z</dc:date>
    <item>
      <title>Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917685#M686983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a condition where I need to use Inner join to join three of the tables, (ekko,ekpo and Eket)&lt;/P&gt;&lt;P&gt;I need to select PO number, item no, matnr, and Price based on the following condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ekko-bsart-&amp;gt;  'NB',&lt;/P&gt;&lt;P&gt;Ekko-ekgrp-&amp;gt; 234&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ekpo-elikz-&amp;gt; '  '&lt;/P&gt;&lt;P&gt;ekpo-afnam-&amp;gt; 'z'&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;Eket-eindt-&amp;gt; '10/10/2007'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please help me out.....&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;Rajeev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rajeev  Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 00:01:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917685#M686983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T00:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917686#M686984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not a good idea to join these 3 tables specially when you do not have primary keys to pass in WHERE Condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you first get data from EKPO - you can use standard index "A" while extracting data. You need to pass AFNAM and BSTYP in WHERE Condition. I believe you are populating PO data so BSTYP should be equal to "F". Get data into internal table IT_EKPO. Filter this based upon condition ELIKZ = space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use IT_EKPO to get data from EKKO, get data into IT_EKKO,  filter this based upon &lt;/P&gt;&lt;P&gt;Ekko-bsart-&amp;gt; 'NB',&lt;/P&gt;&lt;P&gt;Ekko-ekgrp-&amp;gt; 234&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then get data from EKET for all entries in IT_EKPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end you can combine these 3 tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using JOIN in such case will increase runtime and program will be slow.&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;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 00:07:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917686#M686984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T00:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917687#M686985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you paste your code. Will modify it if something wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 00:07:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917687#M686985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T00:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917688#M686986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ashish thanks for the reply....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;even I did the same but my team lead wants me to use inner join, so I will appreciate if you can tell me how to use inner join in this case.&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;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 00:09:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917688#M686986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T00:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917689#M686987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Atish, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually I haven't used Inner join before, I am new to ABAP and I was just using the simple select statement, but I have been advised to use the Inner join. so I will appreciate if you can help me out.&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;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 00:10:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917689#M686987</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T00:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917690#M686988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you looked the sample code in ABAP help for JOINS. just try first it yourself, otherwise how will you learn :). If you miss anything or anything goes wrong we will definately help you. INNER JOIN is the most common feature of any SQL and I think you should first try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 00:13:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917690#M686988</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T00:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917691#M686989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok here is the SELECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT EKKO~&amp;lt;FIELDNAME&amp;gt;&lt;/P&gt;&lt;P&gt;              EKPO~&amp;lt;FIELDNAME&amp;gt;&lt;/P&gt;&lt;P&gt;              EKET~&amp;lt;FIELDNAME&amp;gt;&lt;/P&gt;&lt;P&gt;  INTO TABLE IT_EKKO&lt;/P&gt;&lt;P&gt;  FROM EKKO&lt;/P&gt;&lt;P&gt;      INNER JOIN EKPO ON&lt;/P&gt;&lt;P&gt;         EKPO&lt;SUB&gt;EBELN = EKKO&lt;/SUB&gt;EBELN AND&lt;/P&gt;&lt;P&gt;         EKPO~ELIKZ   = SPACE           AND&lt;/P&gt;&lt;P&gt;         EKPO~AFNAM = 'Z'&lt;/P&gt;&lt;P&gt;      INNER JOIN EKET ON&lt;/P&gt;&lt;P&gt;         EKET&lt;SUB&gt;EBELN = EKPO&lt;/SUB&gt;EBELN AND&lt;/P&gt;&lt;P&gt;         EKET&lt;SUB&gt;EBELP = EKPO&lt;/SUB&gt;EBELP AND&lt;/P&gt;&lt;P&gt;         EKET~EINDT = 10/10/2007'&lt;/P&gt;&lt;P&gt;    WHERE Ekko~bsart- = 'NB' AND&lt;/P&gt;&lt;P&gt;                 Ekko~ekgrp = '234'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not a good idea to use join in this case. In above SELECT add your fields after SELECT.&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;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 00:13:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917691#M686989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T00:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917692#M686990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much for the reply Aashish..will definately discuss this with my team lead. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyways thanks again!!! reward points will definately be awarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 00:16:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917692#M686990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T00:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917693#M686991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ashish I wrote the code told by you but I am getting the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field "EKPO-EBELN" unknown.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please tel me whats the prob.&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;rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 01:14:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917693#M686991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T01:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917694#M686992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use '~' instead of '-'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 01:16:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917694#M686992</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T01:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917695#M686993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Rajeev.&lt;/P&gt;&lt;P&gt;EKKO,EKPO and EKET are Purchase Orders Tables,I found the relationship between them.&lt;/P&gt;&lt;P&gt;EKPO(Purchasing Document Item) includes Purchasing Doc(EBELN),Item(EBELP).&lt;/P&gt;&lt;P&gt;EKKO(Purchasing Document Header) includes Purchasing Doc(EBELN).&lt;/P&gt;&lt;P&gt;EKET(Delivery Schedules) includes Purchasing Doc(EBELN),Item(EBELP),Delivery Schedule(ETENR).&lt;/P&gt;&lt;P&gt;You can inner join three tables based this relationship.And I think it's no need to join three tables,because EKPO&lt;SUB&gt;EBELN is PO number, EKPO&lt;/SUB&gt;EBELP is item no,EKPO&lt;SUB&gt;ZZITEM1 is matnr,and EKPO&lt;/SUB&gt;NETPR is Price.Am I right?If there is something wrong,please reply me.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;feng.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 01:30:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917695#M686993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T01:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917696#M686994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Atish, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the nice advise, even I think that was the wrong appraoch ...I should have tried it first on my own..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 04:12:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2917696#M686994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-23T04:12:49Z</dc:date>
    </item>
  </channel>
</rss>

