<?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: Self join using ABAP Query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816038#M349374</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Thanks all of u. I have got the solution..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Madhumathi A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jan 2007 09:44:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-24T09:44:24Z</dc:date>
    <item>
      <title>Self join using ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816032#M349368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;How to create a self join using ABAP Query? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say, I have this table EKBE with belnr (materials doc num) and lfbnr (reference material doc num). I have to pick the PO's from EKBE whose belnr doesnt have any lfbnr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Madhumathi A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 07:30:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816032#M349368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T07:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Self join using ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816033#M349369</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;in select option mention the condition that lfbnr = 0 and belnr &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will fecth only the required&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 07:35:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816033#M349369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T07:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Self join using ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816034#M349370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi madhu,&lt;/P&gt;&lt;P&gt;         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : ekbe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data itab like standard table of ekbe with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ekbe into table itab where belnr &amp;gt;&amp;lt; 0 and lfbnr = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; itab-belnr,itab-lfbnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this code this works to select the orders whose belnr doesnt have any lfbnr&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>Wed, 24 Jan 2007 07:48:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816034#M349370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T07:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Self join using ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816035#M349371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;My requirement is that,&lt;/P&gt;&lt;P&gt;I have to pick the PO's with movement type 103, which does not have a corresponding 104 document (which are not rejected) using ABAP query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in this case I think a different logic should be used altogether. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Madhumathi A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 07:53:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816035#M349371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T07:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Self join using ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816036#M349372</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;Use the below select - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from ekbe as a&lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;where not exists ( select * from ekbe &lt;/P&gt;&lt;P&gt;		   where ifbnr eq a~belnr ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works..&lt;/P&gt;&lt;P&gt;Reward points if found useful...!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 08:04:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816036#M349372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T08:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Self join using ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816037#M349373</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 out this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:&lt;/P&gt;&lt;P&gt;                 s_belnr for ekbe-belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of it_ekbe occurs 0,&lt;/P&gt;&lt;P&gt;          ebeln like ekbe-ebeln,&lt;/P&gt;&lt;P&gt;          belnr like ekbe-belnr,&lt;/P&gt;&lt;P&gt;        end of it_ekbe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select  distinct a&lt;SUB&gt;ebeln a&lt;/SUB&gt;belnr&lt;/P&gt;&lt;P&gt;    into  corresponding fields of table it_ekbe&lt;/P&gt;&lt;P&gt;    from  ekbe as a inner join ekbe as b&lt;/P&gt;&lt;P&gt;      on  a&lt;SUB&gt;belnr &amp;lt;&amp;gt; b&lt;/SUB&gt;lfbnr&lt;/P&gt;&lt;P&gt;   where  a~belnr in s_belnr and&lt;/P&gt;&lt;P&gt;          b~belnr in s_belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOPE THIS WILL HELP YOU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regs&lt;/P&gt;&lt;P&gt;Nimesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 08:15:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816037#M349373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T08:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Self join using ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816038#M349374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Thanks all of u. I have got the solution..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Madhumathi A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 09:44:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816038#M349374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T09:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Self join using ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816039#M349375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be helpful for me, if you post your solution that you found for your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2016 09:45:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-join-using-abap-query/m-p/1816039#M349375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-19T09:45:13Z</dc:date>
    </item>
  </channel>
</rss>

