<?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: JOIN Statement alternatives in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-statement-alternatives/m-p/3186124#M758736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try by removing DISTINCT key word from your select statment????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Dec 2007 11:32:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-21T11:32:17Z</dc:date>
    <item>
      <title>JOIN Statement alternatives</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-statement-alternatives/m-p/3186123#M758735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks, I have a problem with a join statement.basically i am trying to read GL Document data.I have the statement below but when it searches in table PPOIX it only retrieves the first match it finds based on pp0ix-runid = ppdix-runid and pp0ix-tslin = ppdix-linum.What i want to do is get all tslin for each linum found in ppdix. if i leave out pp0ix-tslin = ppdix-linum then i will get every line per runid but i just want lines that are found in ppdix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT DISTINCT ppdit~hkont&lt;/P&gt;&lt;P&gt;                    ppdit~kostl&lt;/P&gt;&lt;P&gt;                    ppoix~pernr&lt;/P&gt;&lt;P&gt;                    ppoix~betrg&lt;/P&gt;&lt;P&gt;                    ppoix~waers&lt;/P&gt;&lt;P&gt;         INTO TABLE gt_gl_lines&lt;/P&gt;&lt;P&gt;         FROM ppdit&lt;/P&gt;&lt;P&gt;         JOIN ppdix  ON ppdix&lt;SUB&gt;docnum   = ppdit&lt;/SUB&gt;docnum&lt;/P&gt;&lt;P&gt;                     AND ppdix&lt;SUB&gt;doclin  = ppdit&lt;/SUB&gt;doclin&lt;/P&gt;&lt;P&gt;         JOIN ppoix  ON ppoix&lt;SUB&gt;runid    = ppdix&lt;/SUB&gt;runid&lt;/P&gt;&lt;P&gt;                     AND  ppoix&lt;SUB&gt;tslin  = ppdix&lt;/SUB&gt;linum&lt;/P&gt;&lt;P&gt;                     WHERE ppdix~runid = gs_gl_docs-runid&lt;/P&gt;&lt;P&gt;                     AND ppdit~docnum  = gs_gl_docs-docnum&lt;/P&gt;&lt;P&gt;                     AND ppdit~kostl   = l_kostl_new.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Damien Kesle on Dec 21, 2007 12:21 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 11:19:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-statement-alternatives/m-p/3186123#M758735</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T11:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: JOIN Statement alternatives</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-statement-alternatives/m-p/3186124#M758736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try by removing DISTINCT key word from your select statment????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 11:32:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-statement-alternatives/m-p/3186124#M758736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T11:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: JOIN Statement alternatives</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-statement-alternatives/m-p/3186125#M758737</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;   The addition DISTINCT forces a sort on the database server.You should therefore only use it if you are really expecting duplicatesin the result set. &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;Mohan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 11:50:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-statement-alternatives/m-p/3186125#M758737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T11:50:13Z</dc:date>
    </item>
  </channel>
</rss>

