<?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: Selection question in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936334#M692005</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;creat 3 structures &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st useing A B C &lt;/P&gt;&lt;P&gt;2nd A D E &lt;/P&gt;&lt;P&gt;3rd A B C D E &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select data from 1st db tabke and store in 1st internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select data from 2nd database table and store it in 2nd internal table for all entries in 1st internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at 1st internal table and put read on 2nd intenral table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move values of thesee to final internal table i.e 3 rd internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if usefull&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Oct 2007 13:37:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-10T13:37:22Z</dc:date>
    <item>
      <title>Selection question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936329#M692000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to select a db table to have this result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
-------------     -------------
| A | B | C |     | A | D | E |
|-----------|     |-----------|
| 1 | A | A |     | 1 | A | A |
| 2 | B | B |     | 2 | B | B |
| 3 | C | C |     -------------
-------------

RESULT
--------------------
| A | B | C | D | E |
|-------------------|
| 3 | C | C |   |   |
---------------------

OR 

-------------
| A | B | C |
|------------
| 3 | C | C |
-------------
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I accomplish this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I accomplish this by using loops to delete the duplicate entries. Is it possible to be selected in one SELECT statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 13:21:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936329#M692000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T13:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Selection question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936330#M692001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In where, the condition the keys must be different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: where a&lt;SUB&gt;A &amp;lt;&amp;gt; b&lt;/SUB&gt;A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 13:29:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936330#M692001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T13:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Selection question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936331#M692002</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;Yes you can get the result that you wanted using a Select statement. This can be acheived by using Join conditions on the two tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With an inner join, you only get the records of the cross-product table for which there is an entry in all tables involved in the view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With an outer join, records are also selected for which there is no entry in some of the secondary tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set of hits determined by an outer join can therefore be a true set of the subset of hits determined with an inner join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for your scenario you can use Outer Join..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 13:30:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936331#M692002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T13:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Selection question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936332#M692003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select A B C from tab1 into itab.&lt;/P&gt;&lt;P&gt;select A D E from tab2 into itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;read table itab1 with key A = itab-A.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;delete itab index sy-tabix.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;move corresponding itab to itab2.&lt;/P&gt;&lt;P&gt;move corresponding itab1 to itab2.&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;clear itab2.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 13:32:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936332#M692003</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T13:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Selection question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936333#M692004</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;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from table1&lt;/P&gt;&lt;P&gt;   inner join table2&lt;/P&gt;&lt;P&gt;   on table1&lt;SUB&gt;A = table2&lt;/SUB&gt;A&lt;/P&gt;&lt;P&gt;   where table1~A = condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from table1&lt;/P&gt;&lt;P&gt;  where conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from table2&lt;/P&gt;&lt;P&gt;     where A = table1-A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append int_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endselect.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 13:34:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936333#M692004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T13:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Selection question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936334#M692005</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;creat 3 structures &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st useing A B C &lt;/P&gt;&lt;P&gt;2nd A D E &lt;/P&gt;&lt;P&gt;3rd A B C D E &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select data from 1st db tabke and store in 1st internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select data from 2nd database table and store it in 2nd internal table for all entries in 1st internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at 1st internal table and put read on 2nd intenral table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move values of thesee to final internal table i.e 3 rd internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if usefull&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 13:37:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936334#M692005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T13:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Selection question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936335#M692006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Ricardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look if this is what u want plx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: &lt;/P&gt;&lt;P&gt;BEGIN OF i_table1 OCCURS 0,&lt;/P&gt;&lt;P&gt;        a,&lt;/P&gt;&lt;P&gt;        b,&lt;/P&gt;&lt;P&gt;        c,&lt;/P&gt;&lt;P&gt;      END OF i_table1,&lt;/P&gt;&lt;P&gt;      BEGIN OF i_table2 OCCURS 0,&lt;/P&gt;&lt;P&gt;        a,&lt;/P&gt;&lt;P&gt;        d,&lt;/P&gt;&lt;P&gt;        e,&lt;/P&gt;&lt;P&gt;      END OF i_table2,&lt;/P&gt;&lt;P&gt;      BEGIN OF i_table3 OCCURS 0,&lt;/P&gt;&lt;P&gt;        a LIKE i_table1-a,&lt;/P&gt;&lt;P&gt;        b LIKE i_table1-b,&lt;/P&gt;&lt;P&gt;        c LIKE i_table1-c,&lt;/P&gt;&lt;P&gt;        d LIKE i_table2-d,&lt;/P&gt;&lt;P&gt;        e LIKE i_table2-e,&lt;/P&gt;&lt;P&gt;      END OF i_table3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_table1-a = '1'.&lt;/P&gt;&lt;P&gt;i_table1-b = 'A'.&lt;/P&gt;&lt;P&gt;i_table1-c = 'A'.&lt;/P&gt;&lt;P&gt;APPEND i_table1.&lt;/P&gt;&lt;P&gt;i_table1-a = '2'.&lt;/P&gt;&lt;P&gt;i_table1-b = 'B'.&lt;/P&gt;&lt;P&gt;i_table1-c = 'B'.&lt;/P&gt;&lt;P&gt;APPEND i_table1.&lt;/P&gt;&lt;P&gt;i_table1-a = '3'.&lt;/P&gt;&lt;P&gt;i_table1-b = 'C'.&lt;/P&gt;&lt;P&gt;i_table1-c = 'C'.&lt;/P&gt;&lt;P&gt;APPEND i_table1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_table2-a = '1'.&lt;/P&gt;&lt;P&gt;i_table2-d = 'A'.&lt;/P&gt;&lt;P&gt;i_table2-e = 'A'.&lt;/P&gt;&lt;P&gt;APPEND i_table2.&lt;/P&gt;&lt;P&gt;i_table2-a = '2'.&lt;/P&gt;&lt;P&gt;i_table2-d = 'B'.&lt;/P&gt;&lt;P&gt;i_table2-e = 'B'.&lt;/P&gt;&lt;P&gt;APPEND i_table2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_table1.&lt;/P&gt;&lt;P&gt;  READ TABLE i_table2 WITH KEY a = i_table1-a.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 4.&lt;/P&gt;&lt;P&gt;    APPEND i_table1 TO i_table3.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_table3.&lt;/P&gt;&lt;P&gt;  WRITE: / i_table3.&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Allan Cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 13:53:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936335#M692006</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T13:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Selection question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936336#M692007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; In where, the condition the keys must be different.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Ex: where a&lt;SUB&gt;A &amp;lt;&amp;gt; b&lt;/SUB&gt;A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please elaborate? &lt;SUP&gt;_&lt;/SUP&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 05:11:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936336#M692007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T05:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Selection question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936337#M692008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Yes you can get the result that you wanted using a&lt;/P&gt;&lt;P&gt;&amp;gt; Select statement. This can be acheived by using Join&lt;/P&gt;&lt;P&gt;&amp;gt; conditions on the two tables.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; With an inner join, you only get the records of the&lt;/P&gt;&lt;P&gt;&amp;gt; cross-product table for which there is an entry in&lt;/P&gt;&lt;P&gt;&amp;gt; all tables involved in the view.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; With an outer join, records are also selected for&lt;/P&gt;&lt;P&gt;&amp;gt; which there is no entry in some of the secondary&lt;/P&gt;&lt;P&gt;&amp;gt; tables.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; The set of hits determined by an outer join can&lt;/P&gt;&lt;P&gt;&amp;gt; therefore be a true set of the subset of hits&lt;/P&gt;&lt;P&gt;&amp;gt; determined with an inner join.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; So for your scenario you can use Outer Join..&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Thanks,&lt;/P&gt;&lt;P&gt;&amp;gt; Suresh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi! Is it ok if you will provide the SELECT statement? &lt;SUP&gt;_&lt;/SUP&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 05:13:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936337#M692008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T05:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Selection question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936338#M692009</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;Try this..You can use sub query..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  A B C D E&lt;/P&gt;&lt;P&gt;  INTO  TABLE Itab&lt;/P&gt;&lt;P&gt;  FROM  table1&lt;/P&gt;&lt;P&gt;  WHERE NOT EXISTS ( select  *&lt;/P&gt;&lt;P&gt;                   FROM  table2&lt;/P&gt;&lt;P&gt;                   WHERE A   =  table1~A ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 05:22:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936338#M692009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T05:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Selection question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936339#M692010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select all data using outer join then delete all records where D or E is not blank.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 03:55:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-question/m-p/2936339#M692010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T03:55:48Z</dc:date>
    </item>
  </channel>
</rss>

