<?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: Query on select-options in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425561#M822673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select partner partner_guid&lt;/P&gt;&lt;P&gt;from but000&lt;/P&gt;&lt;P&gt;into table it_bp&lt;/P&gt;&lt;P&gt;where partner not in s_bp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use not in where condition&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Feb 2008 13:06:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-21T13:06:57Z</dc:date>
    <item>
      <title>Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425559#M822671</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;     I have a select-option so_bp. &lt;/P&gt;&lt;P&gt;I fired the following select query:-&lt;/P&gt;&lt;P&gt;select partner partner_guid&lt;/P&gt;&lt;P&gt;from but000&lt;/P&gt;&lt;P&gt;into table it_bp&lt;/P&gt;&lt;P&gt;where partner in s_bp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, it_bp contains all BPs that exist in table BUT000 for the range so_bp-low to so_bp-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, I also want to fill another table containing entries from so_bp that dont exist in table BUT000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g:-&lt;/P&gt;&lt;P&gt;let so_bp-low = 850 and so_bp-high = 875.&lt;/P&gt;&lt;P&gt;Records 860, 863 and 868 DONT EXIST in table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, it_bp contains all records from 850 to 875 execpt the above three records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want thse three records into another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how do I achieve this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:01:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425559#M822671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425560#M822672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare another internal table same as it_bp say its name is it_bp_other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select partner partner_guid&lt;/P&gt;&lt;P&gt;from but000&lt;/P&gt;&lt;P&gt;into table it_bp_other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete it_bp_other where not partner in s_bp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the internal tbale it_bp_other holds the records what you expected( those doesn't exist in it_bp) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Yellappa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:06:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425560#M822672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425561#M822673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select partner partner_guid&lt;/P&gt;&lt;P&gt;from but000&lt;/P&gt;&lt;P&gt;into table it_bp&lt;/P&gt;&lt;P&gt;where partner not in s_bp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use not in where condition&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:06:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425561#M822673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425562#M822674</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;First get all the records into one table and loop at the itab put condition if value = 860  or value = 863 or value = 868 then append wa into itab1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa where value = '860' or value or value = '863' or value = '868'&lt;/P&gt;&lt;P&gt;append wa into itab1&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;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:07:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425562#M822674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425563#M822675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Yellappa and Madhuri for replying,&lt;/P&gt;&lt;P&gt;              &lt;/P&gt;&lt;P&gt;Yellappa... that logic would work. But, but000 contains lakhs of records. Wouldnt it hamper the performance ?&lt;/P&gt;&lt;P&gt;Can you please suggest me of some better way to do it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Madhuri.. I think your select query would return all BPs that are not in the range... thats not my requirement !!!!!&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;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:12:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425563#M822675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425564#M822676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhavi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Negative statement like NOT is not recommeded when using select statement as it causes performance issue. Instead select all the records from the table and delete the records from internal table. I have mentioned in this same forum above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yellappa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:12:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425564#M822676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425565#M822677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siva,&lt;/P&gt;&lt;P&gt;        360... 363 and 368 are just example records I have given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont know which records are present and which are not present in the table... so how do I write IF .. ?&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;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425565#M822677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425566#M822678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have assumes only ranges would be inputted and NO EXTENSION has been added in the declaration of S-BP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
l_times = s_bp-low.
do.
  read table it_bp with key partner = l_times.
  if sy-subrc ne 0.
    lt_bp-partner = it_bp-partner.
    append lt_bp.
  endif.
  l_times = l_times + 1.
  if l_times gt s_bp-high.
    exit.
  endif.
enddo.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 21, 2008 11:06 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:19:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425566#M822678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425567#M822679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yellappa,&lt;/P&gt;&lt;P&gt;          I think even your logic would return all records in BUT000 that are not in the range I specified (Same as the select query that Madhuri has written).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But according to my requirement, only records 860... 863 and 868 should have gone in the other internal table (NOT ALL records that are outside the range)&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;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:21:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425567#M822679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425568#M822680</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;Then where will you get the other values? if you get more values then pass the to a range and user where r_value&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;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:24:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425568#M822680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425569#M822681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Balaji,&lt;/P&gt;&lt;P&gt;        thats exactly what I was looking for... &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(truly speaking) I thought of that logic ... but thought it was not a good idea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyways ... I'll go with that logic !!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425569#M822681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425570#M822682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for my misunderstading. I have added additional code here to the already suggested code where s_bp may have multiple ranges and changes are in bold letters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sort s_bp by low.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at s_bp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_times = s_bp-low.&lt;/P&gt;&lt;P&gt;do.&lt;/P&gt;&lt;P&gt;  read table it_bp with key partner = l_times.&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    lt_bp-partner = it_bp-partner.&lt;/P&gt;&lt;P&gt;    append lt_bp.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  l_times = l_times + 1.&lt;/P&gt;&lt;P&gt;  if l_times gt s_bp-high.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&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;Yellappa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:28:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425570#M822682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425571#M822683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Yellappa !!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:30:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425571#M822683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T13:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Query on select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425572#M822684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just a small correction,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of &lt;/P&gt;&lt;P&gt;lt_bp-partner = it_bp-partner&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it should be&lt;/P&gt;&lt;P&gt;lt_bp-partner = l_times.&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;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 06:58:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-select-options/m-p/3425572#M822684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T06:58:30Z</dc:date>
    </item>
  </channel>
</rss>

