<?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: Multiple Table Join Selection in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-table-join-selection/m-p/4218005#M1007817</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this link here might cause a problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LEFT OUTER JOIN mkpf ON ekpo~ebeln = mkpf~bktxt&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think as soon as there is more than one MKPF found with BKTXT = EBELN, you end up with multiple lines in your internal table. Also EKET can have more than one line per EKPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jul 2008 08:32:44 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2008-07-14T08:32:44Z</dc:date>
    <item>
      <title>Multiple Table Join Selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-table-join-selection/m-p/4218002#M1007814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the following select statement, I just hope to exclude the PO item if delivery is complete, but when I get two same item (same material) in one PO and only one is delivery completed, all 2 items were picked into internal table?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ekko&lt;SUB&gt;lifnr ekko&lt;/SUB&gt;ebeln ekpo&lt;SUB&gt;matnr ekpo&lt;/SUB&gt;txz01 ekko&lt;SUB&gt;aedat ekpo&lt;/SUB&gt;menge ekpo&lt;SUB&gt;meins eket&lt;/SUB&gt;wemng stpo&lt;SUB&gt;idnrk mkpf&lt;/SUB&gt;mblnr&lt;/P&gt;&lt;P&gt;  INTO TABLE gt_prodord&lt;/P&gt;&lt;P&gt;  FROM ekpo&lt;/P&gt;&lt;P&gt;  JOIN ekko ON ekko&lt;SUB&gt;ebeln = ekpo&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;  JOIN eket ON eket&lt;SUB&gt;ebeln = ekpo&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;    AND eket&lt;SUB&gt;ebelp = ekpo&lt;/SUB&gt;ebelp&lt;/P&gt;&lt;P&gt;  JOIN mast ON mast&lt;SUB&gt;matnr = ekpo&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;    AND mast&lt;SUB&gt;werks = ekpo&lt;/SUB&gt;werks&lt;/P&gt;&lt;P&gt;  JOIN stpo ON stpo&lt;SUB&gt;stlnr = mast&lt;/SUB&gt;stlnr&lt;/P&gt;&lt;P&gt;  LEFT OUTER JOIN mkpf ON ekpo&lt;SUB&gt;ebeln = mkpf&lt;/SUB&gt;bktxt&lt;/P&gt;&lt;P&gt;  WHERE ekko~bsart = 'NB'&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;AND ekpo~elikz NE 'X'&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt; AND ekpo~loekz NE 'L'&lt;/P&gt;&lt;P&gt;  AND stpo~postp = 'L'&lt;/P&gt;&lt;P&gt;  AND ekpo~werks BETWEEN lv_werks_l AND lv_werks_h&lt;/P&gt;&lt;P&gt;  AND ekpo~matkl BETWEEN lv_matkl_l AND lv_matkl_h&lt;/P&gt;&lt;P&gt;  AND ekko~lifnr BETWEEN lv_lifnr_l AND lv_lifnr_h&lt;/P&gt;&lt;P&gt;  AND ekko~aedat BETWEEN lv_aedat_l AND lv_aedat_h&lt;/P&gt;&lt;P&gt;  ORDER BY ekko&lt;SUB&gt;lifnr ekko&lt;/SUB&gt;ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: abapsydney on Jul 14, 2008 8:16 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2008 06:15:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-table-join-selection/m-p/4218002#M1007814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-14T06:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Table Join Selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-table-join-selection/m-p/4218003#M1007815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Suggestion?!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2008 07:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-table-join-selection/m-p/4218003#M1007815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-14T07:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Table Join Selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-table-join-selection/m-p/4218004#M1007816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With reference to your question&lt;/P&gt;&lt;P&gt;[but when I get two same item (same material) in one PO and only one is delivery completed, all 2 items were picked into internal table]&lt;/P&gt;&lt;P&gt;I think may be system is repeating the line item whose delivery is not complete twice. &lt;/P&gt;&lt;P&gt;To verify this you can include like item number EKPO-EBELP in your output (Make sure to add it also in your internal table gt_prodord) and verify if it is repeated or the line items returned are truly unique?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"SELECT ekko&lt;SUB&gt;lifnr ekko&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt; ekpo~matnr &lt;/P&gt;&lt;P&gt;ekpo-ebelp           "Just add PO line item number&lt;/P&gt;&lt;P&gt;ekpo&lt;SUB&gt;txz01 ekko&lt;/SUB&gt;aedat ekpo&lt;SUB&gt;menge ekpo&lt;/SUB&gt;meins eket&lt;SUB&gt;wemng stpo&lt;/SUB&gt;idnrk mkpf~mblnr&lt;/P&gt;&lt;P&gt;INTO TABLE gt_prodord  ...............&lt;/P&gt;&lt;P&gt;....................&lt;/P&gt;&lt;P&gt;.......................&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;This way you can check if the line items you are getting are repeated or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2008 08:17:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-table-join-selection/m-p/4218004#M1007816</guid>
      <dc:creator>Rashid_Javed</dc:creator>
      <dc:date>2008-07-14T08:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Table Join Selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-table-join-selection/m-p/4218005#M1007817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this link here might cause a problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LEFT OUTER JOIN mkpf ON ekpo~ebeln = mkpf~bktxt&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think as soon as there is more than one MKPF found with BKTXT = EBELN, you end up with multiple lines in your internal table. Also EKET can have more than one line per EKPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2008 08:32:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-table-join-selection/m-p/4218005#M1007817</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-07-14T08:32:44Z</dc:date>
    </item>
  </channel>
</rss>

