<?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: joininig SQL statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178254#M124958</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select A&lt;SUB&gt;ebeln B&lt;/SUB&gt;ebelp c~etenr &lt;/P&gt;&lt;P&gt;min( C~eindt ) as eindt &lt;/P&gt;&lt;P&gt;into corresponding fields of table tt &lt;/P&gt;&lt;P&gt;from ekko as A &lt;/P&gt;&lt;P&gt;join ekpo as B &lt;/P&gt;&lt;P&gt;on A&lt;SUB&gt;ebeln = B&lt;/SUB&gt;ebeln &lt;/P&gt;&lt;P&gt;join eket as C &lt;/P&gt;&lt;P&gt;on B&lt;SUB&gt;ebeln = C&lt;/SUB&gt;ebeln and B&lt;SUB&gt;ebelp = C&lt;/SUB&gt;ebel&lt;/P&gt;&lt;P&gt;where .......&lt;/P&gt;&lt;P&gt;group by a&lt;SUB&gt;ebeln b&lt;/SUB&gt;ebelp c~etenr &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jan 2006 03:50:51 GMT</pubDate>
    <dc:creator>former_member186741</dc:creator>
    <dc:date>2006-01-17T03:50:51Z</dc:date>
    <item>
      <title>joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178242#M124946</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;&lt;/P&gt;&lt;P&gt;I want to join 2 db tables (A, B), and select a minimum column (A~field1) from db table A, what should be the sql statement? Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select (....)&lt;/P&gt;&lt;P&gt; into corresponding fields of itab&lt;/P&gt;&lt;P&gt; from ekko as A&lt;/P&gt;&lt;P&gt; join ekpo as B&lt;/P&gt;&lt;P&gt; on A&lt;SUB&gt;ebeln = B&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt; where (....).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; append itab. &lt;/P&gt;&lt;P&gt;Endselect&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:01:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178242#M124946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T03:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178243#M124947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Macy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select (....)&lt;/P&gt;&lt;P&gt;into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;from ekko as A&lt;/P&gt;&lt;P&gt;inner join ekpo as B &lt;/P&gt;&lt;P&gt;on A&lt;SUB&gt;ebeln = B&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;where (....).&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;&lt;/P&gt;&lt;P&gt;Suresh Datti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:05:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178243#M124947</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-01-17T03:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178244#M124948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Select (....)
into corresponding fields of itab
from ekko as A
join ekpo as B
on A~ebeln = B~ebeln
where A~field1 = ( SELECT min(field1) from A ).

append itab. 
Endselect&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:05:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178244#M124948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T03:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178245#M124949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your prototype select is pretty much ok, you need the MIN aggregate function:&lt;/P&gt;&lt;P&gt;Select MIN (....) AS ??? "??? = SAME NAME AS COLUMN IN ITAB&lt;/P&gt;&lt;P&gt;into corresponding fields of TABLE itab&lt;/P&gt;&lt;P&gt;from ekko as A&lt;/P&gt;&lt;P&gt;join ekpo as B&lt;/P&gt;&lt;P&gt;on A&lt;SUB&gt;ebeln = B&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;where (....).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Neil Woodruff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:05:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178245#M124949</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-01-17T03:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178246#M124950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works ...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES : ekko.

DATA : begin of i_data occurs 0,
          ebeln LIKE ekko-ebeln,
       end of i_data.

select ekko~ebeln
  into table i_data
  from ekko join ekpo on ekko~ebeln = ekpo~ebeln
where ekko~field1 IN ( SELECT min( field1 ) from ekko ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you want?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:17:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178246#M124950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T03:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178247#M124951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry,&lt;/P&gt;&lt;P&gt;I should have said that I have 3 db tables (A, B, C) to join.&lt;/P&gt;&lt;P&gt;And I'd like to get the min fieldX value from C.&lt;/P&gt;&lt;P&gt;What should be the SQL statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select A&lt;SUB&gt;field1 B&lt;/SUB&gt;field2 &lt;/P&gt;&lt;P&gt; min( C~fieldX)&lt;/P&gt;&lt;P&gt; into corresponding fields of TABLE itab&lt;/P&gt;&lt;P&gt; from ekko as A&lt;/P&gt;&lt;P&gt; join ekpo as B&lt;/P&gt;&lt;P&gt; on A&lt;SUB&gt;ebeln = B&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt; join eket as C&lt;/P&gt;&lt;P&gt; on B&lt;SUB&gt;ebeln = C&lt;/SUB&gt;ebeln and B&lt;SUB&gt;ebelp = C&lt;/SUB&gt;ebelp &lt;/P&gt;&lt;P&gt; where (....).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endselect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:21:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178247#M124951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T03:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178248#M124952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select A&lt;SUB&gt;field1 B&lt;/SUB&gt;field2 &lt;/P&gt;&lt;P&gt;min( C~fieldX) as fieldX&lt;/P&gt;&lt;P&gt;into corresponding fields of TABLE itab&lt;/P&gt;&lt;P&gt;from ekko as A&lt;/P&gt;&lt;P&gt;join ekpo as B&lt;/P&gt;&lt;P&gt;on A&lt;SUB&gt;ebeln = B&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;join eket as C&lt;/P&gt;&lt;P&gt;on B&lt;SUB&gt;ebeln = C&lt;/SUB&gt;ebeln and B&lt;SUB&gt;ebelp = C&lt;/SUB&gt;ebelp &lt;/P&gt;&lt;P&gt;where (....).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;no append or endselect required&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178248#M124952</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-01-17T03:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178249#M124953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Select ekko~field1 ekpo~field2 
min( eket~field3 )
into corresponding fields of TABLE itab
from ekko
join ekpo
on ekko~ebeln = ekpo~ebeln
join eket
on ekpo~ebeln = eket~ebeln and ekpo~ebelp = eket~ebelp 
group by ekko~field1 ekpo~field2&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:30:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178249#M124953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T03:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178250#M124954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've followed the code.&lt;/P&gt;&lt;P&gt;But there is syntax error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field "B&lt;SUB&gt;MEINS" from the SELECT list is missing in the GROUP BY clause. addition INTO wa or INTO (g1,...gn) is required. fields of type "" or "A&lt;/SUB&gt;MANDT".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:38:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178250#M124954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T03:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178251#M124955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : begin of i_data occurs 0,
          field1 LIKE ekko-field1,
          field2 LIKE ekpo-field2,
          menge LIKE eket-menge,
       end of i_data.

Select ekko~field1 ekpo~field2
min( eket~menge )
into  TABLE i_data
from ekko
join ekpo
on ekko~ebeln = ekpo~ebeln
join eket
on ekpo~ebeln = eket~ebeln and ekpo~ebelp = eket~ebelp
group by ekko~field1 ekpo~field2&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check whether it works and please let us know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:43:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178251#M124955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T03:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178252#M124956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try again, for example:&lt;/P&gt;&lt;P&gt;Select A&lt;SUB&gt;ebeln B&lt;/SUB&gt;ebelp c~etenr           &lt;/P&gt;&lt;P&gt;min( C~eindt ) as eindt                  &lt;/P&gt;&lt;P&gt;into corresponding fields of table tt    &lt;/P&gt;&lt;P&gt;from ekko as A                           &lt;/P&gt;&lt;P&gt;join ekpo as B                           &lt;/P&gt;&lt;P&gt;on A&lt;SUB&gt;ebeln = B&lt;/SUB&gt;ebeln                     &lt;/P&gt;&lt;P&gt;join eket as C                           &lt;/P&gt;&lt;P&gt;on B&lt;SUB&gt;ebeln = C&lt;/SUB&gt;ebeln and B&lt;SUB&gt;ebelp = C&lt;/SUB&gt;ebel&lt;/P&gt;&lt;P&gt;                                         &lt;/P&gt;&lt;P&gt;group by a&lt;SUB&gt;ebeln b&lt;/SUB&gt;ebelp c~etenr         &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:48:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178252#M124956</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-01-17T03:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178253#M124957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then where could I put the "where clause" ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:49:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178253#M124957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T03:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178254#M124958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select A&lt;SUB&gt;ebeln B&lt;/SUB&gt;ebelp c~etenr &lt;/P&gt;&lt;P&gt;min( C~eindt ) as eindt &lt;/P&gt;&lt;P&gt;into corresponding fields of table tt &lt;/P&gt;&lt;P&gt;from ekko as A &lt;/P&gt;&lt;P&gt;join ekpo as B &lt;/P&gt;&lt;P&gt;on A&lt;SUB&gt;ebeln = B&lt;/SUB&gt;ebeln &lt;/P&gt;&lt;P&gt;join eket as C &lt;/P&gt;&lt;P&gt;on B&lt;SUB&gt;ebeln = C&lt;/SUB&gt;ebeln and B&lt;SUB&gt;ebelp = C&lt;/SUB&gt;ebel&lt;/P&gt;&lt;P&gt;where .......&lt;/P&gt;&lt;P&gt;group by a&lt;SUB&gt;ebeln b&lt;/SUB&gt;ebelp c~etenr &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 03:50:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178254#M124958</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-01-17T03:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178255#M124959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So many thanks to all of you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works. But the result in the itab is unexpected.&lt;/P&gt;&lt;P&gt;I want to retrieve the entry with minimum eindt into table itab, but all the entry (not only min.) are retrieved into itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 04:08:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178255#M124959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T04:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178256#M124960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Macy,&lt;/P&gt;&lt;P&gt;this sql gives you the minimun eindt for each ETENR not the MIN for the whole set. What is it that you wanted?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 04:10:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178256#M124960</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-01-17T04:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178257#M124961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get 1 entry with its minimum delivery date MIN( EINDT ) and other info for each PO item&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 04:16:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178257#M124961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T04:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178258#M124962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want the minimum value of menge for ebeln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Select ekko~ebeln
min( eket~menge )
into corresponding fields of TABLE i_data
from ekko
join ekpo
on ekko~ebeln = ekpo~ebeln
join eket
on ekpo~ebeln = eket~ebeln and ekpo~ebelp = eket~ebelp
where ....
group by ekko~ebeln.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 04:19:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178258#M124962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T04:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: joininig SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178259#M124963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then try,&lt;/P&gt;&lt;P&gt;Select A&lt;SUB&gt;ebeln B&lt;/SUB&gt;ebelp c~etenr              &lt;/P&gt;&lt;P&gt;C~eindt  as eindt                           &lt;/P&gt;&lt;P&gt;into corresponding fields of table tt       &lt;/P&gt;&lt;P&gt;from ekko as A                              &lt;/P&gt;&lt;P&gt;join ekpo as B                              &lt;/P&gt;&lt;P&gt;on A&lt;SUB&gt;ebeln = B&lt;/SUB&gt;ebeln                        &lt;/P&gt;&lt;P&gt;join eket as C                              &lt;/P&gt;&lt;P&gt;on B&lt;SUB&gt;ebeln = C&lt;/SUB&gt;ebeln and B&lt;SUB&gt;ebelp = C&lt;/SUB&gt;ebelp  &lt;/P&gt;&lt;P&gt;where eindt IN ( SELECT min( eindt ) from eket )                                            &lt;/P&gt;&lt;P&gt;.                                           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, this gives you the lowest EINDT in the whole EKET table which is not necessarily what you want. I think you want the MIN (EINDT) of the ones you have selected but I'm not sure how to achieve that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Neil Woodruff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 04:24:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joininig-sql-statement/m-p/1178259#M124963</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-01-17T04:24:33Z</dc:date>
    </item>
  </channel>
</rss>

