<?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 retrieving duplicate records in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391984#M532032</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats it . Thanks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah aware of inner join part but it forces them to make sure that they are maintained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points awarded and thank you for you time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jun 2007 13:49:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-13T13:49:58Z</dc:date>
    <item>
      <title>Join retrieving duplicate records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391980#M532028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone tell me why I am returning 10 records when there only should be one. I can put in a delete duplicates record after this but i would prefer to know what is wrong with the below. Tnks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT MARA&lt;SUB&gt;MATNR MARA&lt;/SUB&gt;PRDHA&lt;/P&gt;&lt;P&gt;         MAKT&lt;SUB&gt;MAKTX T179T&lt;/SUB&gt;VTEXT&lt;/P&gt;&lt;P&gt;         APPENDING CORRESPONDING FIELDS OF TABLE GT_WK_STORAGE&lt;/P&gt;&lt;P&gt;         FROM MARA AS MARA&lt;/P&gt;&lt;P&gt;         INNER JOIN MAKT AS MAKT&lt;/P&gt;&lt;P&gt;         ON MARA&lt;SUB&gt;MATNR EQ MAKT&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;P&gt;         AND SPRAS EQ SY-LANGU&lt;/P&gt;&lt;P&gt;         INNER JOIN T179T AS T179T&lt;/P&gt;&lt;P&gt;         ON MARA&lt;SUB&gt;PRDHA EQ T179T&lt;/SUB&gt;PRODH&lt;/P&gt;&lt;P&gt;         WHERE MARA~MATNR IN S_MATNR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 13:28:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391980#M532028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T13:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Join retrieving duplicate records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391981#M532029</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;I see one error in your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+FROM MARA AS MARA&lt;/P&gt;&lt;P&gt;INNER JOIN MAKT AS MAKT&lt;/P&gt;&lt;P&gt;ON MARA&lt;SUB&gt;MATNR EQ MAKT&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;P&gt;AND SPRAS EQ SY-LANGU+&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can you pretend to join tables MARA and MAKT with field SPRAS, when this field does not exist in MARA ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you should modify your code this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR PRDHA&lt;/P&gt;&lt;P&gt;into CORRESPONDING FIELDS OF GT_WK_STORAGE&lt;/P&gt;&lt;P&gt;from mara&lt;/P&gt;&lt;P&gt;WHERE MATNR IN S_MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT single MAKT&lt;SUB&gt;MAKTX T179T&lt;/SUB&gt;VTEXT&lt;/P&gt;&lt;P&gt;into CORRESPONDING FIELDS OF GT_WK_STORAGE&lt;/P&gt;&lt;P&gt;FROM makt inner join T179T&lt;/P&gt;&lt;P&gt;ON MAKT&lt;SUB&gt;SPRAS EQ T179T&lt;/SUB&gt;SPRAS&lt;/P&gt;&lt;P&gt;WHERE MAKT~MATNR = GT_WK_STORAGE-MATNR&lt;/P&gt;&lt;P&gt;and   spras = sy-langu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append GT_WK_STORAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the code, that I didn´t do it in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 13:37:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391981#M532029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T13:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Join retrieving duplicate records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391982#M532030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tnks but the code is not incorrect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 13:42:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391982#M532030</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T13:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Join retrieving duplicate records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391983#M532031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both tables MAKT and T179T have Language as part of their key so..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MARA&lt;SUB&gt;MATNR MARA&lt;/SUB&gt;PRDHA&lt;/P&gt;&lt;P&gt;MAKT&lt;SUB&gt;MAKTX T179T&lt;/SUB&gt;VTEXT&lt;/P&gt;&lt;P&gt;APPENDING CORRESPONDING FIELDS OF TABLE GT_WK_STORAGE&lt;/P&gt;&lt;P&gt;FROM MARA AS MARA&lt;/P&gt;&lt;P&gt;INNER JOIN MAKT AS MAKT&lt;/P&gt;&lt;P&gt;ON MARA&lt;SUB&gt;MATNR EQ MAKT&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;P&gt;INNER JOIN T179T AS T179T&lt;/P&gt;&lt;P&gt;ON MARA&lt;SUB&gt;PRDHA EQ T179T&lt;/SUB&gt;PRODH&lt;/P&gt;&lt;P&gt;WHERE MARA~MATNR IN S_MATNR&lt;/P&gt;&lt;P&gt;   &amp;lt;i&amp;gt;  AND MAKT~SPRAS = SY-LANGU&lt;/P&gt;&lt;P&gt;    AND  T179T~SPRAS = SY-LANGU.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One issue to be careful with is if the texts are not maintained in all sign-on languages. If they are not, you will not select anything!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 13:43:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391983#M532031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T13:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Join retrieving duplicate records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391984#M532032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats it . Thanks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah aware of inner join part but it forces them to make sure that they are maintained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points awarded and thank you for you time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 13:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391984#M532032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T13:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Join retrieving duplicate records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391985#M532033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried to award you points but got an error message. Not sure if you got them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 13:53:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391985#M532033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T13:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Join retrieving duplicate records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391986#M532034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I don't see why this would give you duplicate enteries (it should not). &lt;/P&gt;&lt;P&gt;However I see that you are using the APPENDING CORRESPONDING FIELDS statement which may possibly lead to duplicates if your SELECT statement is within a LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 13:53:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-retrieving-duplicate-records/m-p/2391986#M532034</guid>
      <dc:creator>former_member378318</dc:creator>
      <dc:date>2007-06-13T13:53:43Z</dc:date>
    </item>
  </channel>
</rss>

