<?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: Inner Join with Negative Condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210295#M1627268</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;Actulally I am sure with the solutions and the problem as well,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think we can fix this by putting these values in exclude tab for the selection either manullly or programmically.&lt;/P&gt;&lt;P&gt;And then write a normal select query using IN operator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anmol.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Oct 2011 09:38:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-10-11T09:38:17Z</dc:date>
    <item>
      <title>Inner Join with Negative Condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210290#M1627263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to select data from two table and I have to exclude some records based on user selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am slecting data fromm MARC and MVKE and I have provided two select option for MTPOS from MVKE  and EKGRP from MARC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exclude the entries where both the field values match with an AND condition &lt;/P&gt;&lt;P&gt;  i.e  MVKE&lt;SUB&gt;MTPOS = XXXX AND MARC&lt;/SUB&gt;EKGRP = YYYY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I write the below statement &lt;/P&gt;&lt;P&gt;  Select  . ....&lt;/P&gt;&lt;P&gt;                 JOIN ......&lt;/P&gt;&lt;P&gt;                WHERE  ( &lt;STRONG&gt;MVKE~MTPOS  NOT IN S_MTPOS AND&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                                 &lt;STRONG&gt;MARC~EKGRP NOT IN  S_EKGRP&lt;/STRONG&gt; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 14:07:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210290#M1627263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-07T14:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with Negative Condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210291#M1627264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A where clause on joined tables should work as a Open SQL does on a table read.  In other words, if you have a select-options entry on the screen, and the user chose to OMIT a range (Exclude Between low high), I would expect to get the correct results with...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where..... IN selection-option range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would not, however, write a NOT IN select-option, though....the user would have already determined that with his Exclude choice, but it will be a lengthy data retrieval (full table scans).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, if you expecting the user to say I-include between low and high as a range that is to be excluded then you can do your way, which should result in a full table scan on both tables, or you can retrieve the remainder of the where clause and the do a 2nd step to delete from your internal table where the values equal those to be omitted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way you can convert this to include...such as looking up possible values, building a ranges table with Include where equal to a single value, then delete the entries that should be omitted from that ranges table....then it becomes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where field in my_ranges_table....a much faster retrieval.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 15:07:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210291#M1627264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-07T15:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with Negative Condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210292#M1627265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not good to use not IN operator in select statement. It will take lot of time on select statement. Better select all the records into a internal table and delete records for the internal table using delete i_tab where f1 not in s_va1 and f2 not in s_var2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Subhankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 23:41:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210292#M1627265</guid>
      <dc:creator>Subhankar</dc:creator>
      <dc:date>2011-10-07T23:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with Negative Condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210293#M1627266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select-options s_ebeln for v_ebeln &lt;/P&gt;&lt;P&gt;                                   &lt;/P&gt;&lt;P&gt;      default 3000000010 to 3000000030 option &lt;STRONG&gt;NB&lt;/STRONG&gt; SIGN I.&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after entering the values in selection screen read the internal table and change the option manually&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read s_ebeln .&lt;/P&gt;&lt;P&gt;s_ebeln-option = 'NB'.&lt;/P&gt;&lt;P&gt;modify s_ebeln .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;generally the option will be BT ( between ) for any select option.&lt;/P&gt;&lt;P&gt;change option field to NB ( not between ) and use the select statement as usual then you will get all the values other than the values given in selection screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 06:26:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210293#M1627266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T06:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with Negative Condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210294#M1627267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can give the following in the where condition,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MVKE&lt;SUB&gt;MTPOS !=S_MTPOS  AND MARC&lt;/SUB&gt;EKGRP != S_EKGRP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jayakrishnn on Oct 11, 2011 10:41 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 08:40:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210294#M1627267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T08:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with Negative Condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210295#M1627268</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;Actulally I am sure with the solutions and the problem as well,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think we can fix this by putting these values in exclude tab for the selection either manullly or programmically.&lt;/P&gt;&lt;P&gt;And then write a normal select query using IN operator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anmol.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 09:38:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-negative-condition/m-p/8210295#M1627268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T09:38:17Z</dc:date>
    </item>
  </channel>
</rss>

