<?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: joins in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922383#M383111</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;You cannot link EKKO and MSEG directly..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fetch the PO item details from EKPO and then the PO History for EKBE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then select the fields you require from MSEG for all entries in EKBE where mblnr eq ekbe-belnr and mjhar eq ekbe-gjahr and zeile eq ekbe-buzei.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correction: this is only in case you need to pick material docs for GR/IR individually&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Feb 2007 08:35:09 GMT</pubDate>
    <dc:creator>anilnal</dc:creator>
    <dc:date>2007-02-22T08:35:09Z</dc:date>
    <item>
      <title>joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922378#M383106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all ,&lt;/P&gt;&lt;P&gt;Please provide the following query using inner join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ebeln bstyp bsart&lt;/P&gt;&lt;P&gt;       FROM ekko&lt;/P&gt;&lt;P&gt;       INTO TABLE t_ekko&lt;/P&gt;&lt;P&gt;       WHERE bstyp = c_bstyp AND&lt;/P&gt;&lt;P&gt;             bsart = c_bsart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF NOT t_ekko[] IS INITIAL.&lt;/P&gt;&lt;P&gt;      SELECT mblnr mjahr zeile bwart matnr werks ebeln&lt;/P&gt;&lt;P&gt;         FROM mseg&lt;/P&gt;&lt;P&gt;         INTO TABLE t_r_mseg&lt;/P&gt;&lt;P&gt;         FOR ALL ENTRIES IN t_ekko&lt;/P&gt;&lt;P&gt;         WHERE ebeln = t_ekko-ebeln AND&lt;/P&gt;&lt;P&gt;               bwart IN s_bwart1     AND&lt;/P&gt;&lt;P&gt;               matnr IN s_matnr     AND&lt;/P&gt;&lt;P&gt;               werks IN s_werks.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:18:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922378#M383106</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-22T08:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922379#M383107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select a&lt;SUB&gt;ebeln a&lt;/SUB&gt;bstyp a&lt;SUB&gt;bsart mblnr b&lt;/SUB&gt;mjahr b&lt;SUB&gt;zeile b&lt;/SUB&gt;bwart b&lt;SUB&gt;matnr b&lt;/SUB&gt;werks &lt;/P&gt;&lt;P&gt;from ekko as a inner join mseg as b on a&lt;SUB&gt;ebeln = b&lt;/SUB&gt;ebeln WHERE a&lt;SUB&gt;bstyp = a&lt;/SUB&gt;c_bstyp AND&lt;/P&gt;&lt;P&gt;a~bsart = c_bsart AND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b~bwart IN s_bwart1 AND&lt;/P&gt;&lt;P&gt;b~matnr IN s_matnr AND&lt;/P&gt;&lt;P&gt;b~werks IN s_werks.&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;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:21:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922379#M383107</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-22T08:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922380#M383108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   Try this query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT mblnr mjahr zeile bwart matnr werks ebeln&lt;/P&gt;&lt;P&gt;FROM mseg INNER JOIN ekko ON mseg-ebeln = ekko-ebeln&lt;/P&gt;&lt;P&gt;INTO TABLE t_r_mseg&lt;/P&gt;&lt;P&gt;bwart IN s_bwart1 AND&lt;/P&gt;&lt;P&gt;matnr IN s_matnr AND&lt;/P&gt;&lt;P&gt;werks IN s_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:23:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922380#M383108</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-02-22T08:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922381#M383109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT ekko&lt;SUB&gt;ebeln ekko&lt;/SUB&gt;bstyp ekko~bsart&lt;/P&gt;&lt;P&gt; mseg&lt;SUB&gt;mblnr mseg&lt;/SUB&gt;mjahr mseg&lt;SUB&gt;zeile mseg&lt;/SUB&gt;bwart mseg&lt;SUB&gt;matnr mseg&lt;/SUB&gt;werks &lt;/P&gt;&lt;P&gt;INTO TABLE t_ekko&lt;/P&gt;&lt;P&gt;FROM ekko inner join mseg&lt;/P&gt;&lt;P&gt;on ekko&lt;SUB&gt;ebeln = mseg&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;WHERE ekko~bstyp = c_bstyp AND&lt;/P&gt;&lt;P&gt;ekko~bsart = c_bsart and&lt;/P&gt;&lt;P&gt;mseg~bwart IN s_bwart1 AND&lt;/P&gt;&lt;P&gt;mseg~matnr IN s_matnr AND&lt;/P&gt;&lt;P&gt;mseg~werks IN s_werks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:26:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922381#M383109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-22T08:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922382#M383110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;shweta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT EKKO&lt;SUB&gt;EBELN EKKO&lt;/SUB&gt;bstyp EKKO~bsart&lt;/P&gt;&lt;P&gt;             MSEG&lt;SUB&gt;EBELN  MSEG&lt;/SUB&gt;mblnr MSEG~mjahr&lt;/P&gt;&lt;P&gt;             MSEG&lt;SUB&gt;zeile MSEG&lt;/SUB&gt;bwart MSEG&lt;SUB&gt;matnr MSEG&lt;/SUB&gt;werks&lt;/P&gt;&lt;P&gt;             MSEG~ebeln&lt;/P&gt;&lt;P&gt;INTO TABLE i_itab &lt;/P&gt;&lt;P&gt;FROM ( EKKO&lt;/P&gt;&lt;P&gt;       INNER JOIN MSEG&lt;/P&gt;&lt;P&gt;       ON MSEG&lt;SUB&gt;EBELN = EKKO&lt;/SUB&gt;EBELN )&lt;/P&gt;&lt;P&gt;      WHERE EKKO~bstyp eq c_bstyp AND&lt;/P&gt;&lt;P&gt;                   EKKO~bsart eq c_bsart AND&lt;/P&gt;&lt;P&gt;                   MSEG~ebeln = t_ekko-ebeln AND&lt;/P&gt;&lt;P&gt;                   MSEG~bwart IN s_bwart1 AND&lt;/P&gt;&lt;P&gt;                   MSEG~matnr IN s_matnr AND&lt;/P&gt;&lt;P&gt;                   MSEG~werks IN s_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note here i_itab should have all the fileds which and all you are selecting &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. Mark if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922382#M383110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-22T08:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922383#M383111</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;You cannot link EKKO and MSEG directly..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fetch the PO item details from EKPO and then the PO History for EKBE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then select the fields you require from MSEG for all entries in EKBE where mblnr eq ekbe-belnr and mjhar eq ekbe-gjahr and zeile eq ekbe-buzei.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correction: this is only in case you need to pick material docs for GR/IR individually&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 08:35:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1922383#M383111</guid>
      <dc:creator>anilnal</dc:creator>
      <dc:date>2007-02-22T08:35:09Z</dc:date>
    </item>
  </channel>
</rss>

