<?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: Select-statement with IN in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-with-in/m-p/5841507#M1318065</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may define the table like this.  But be advised there is a limitation to the number of single values that you can add to the table and use in the IN operator of a SELECT statement.  The only work around for this is to use a RANGE between set numbers or incorporate an exclusion as well.  I think the limit is between 750 and 900.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Types: Begin of t_sv,
              sign(1) type c,
              option(2) type c,
              low(20) type c,
              high(20) type c,
            end of t_sv.
data: lt_singlevalues type table of t_sv.
data: ls_singlevalues like line of lt_singlevalues.


ls_singlevalues-sign = 'I'.
ls_singlevalues-option = 'EQ'.
ls_singlevalues-low = '1000'.
append ls_singlevalues to t_singlevalues.
ls_singlevalues-low = '2000'.
append ls_singlevalues to t_singlevalues.
ls_singlevalues-low = 3000'.
append ls_singlevalues to t_singlevalues.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the LOW and HIGH fields can be a specific type, like if you needed the length to be 30, you can modifiy it, but the SIGN and OPTION fields must be char 1, and char 2 fields respecfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regads,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rich Heilman on Jul 7, 2009 2:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jul 2009 18:51:51 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2009-07-07T18:51:51Z</dc:date>
    <item>
      <title>Select-statement with IN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-with-in/m-p/5841505#M1318063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a number (several thousands) of single values. This values must be inserted into the table lt_singelvalues. Now i want to use a SELECT statement with "IN" like the following example in order to get only values within lt_singlevalues:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  SELECT * from mytable INTO lt_mytable 
     WHERE value IN lt_singlevalues

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i create a table like lt_singlevalues in order to use "WHERE value IN lt_singlevalues"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sid on Jul 7, 2009 8:46 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2009 18:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-with-in/m-p/5841505#M1318063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-07T18:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Select-statement with IN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-with-in/m-p/5841506#M1318064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2009 18:50:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-with-in/m-p/5841506#M1318064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-07T18:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select-statement with IN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-with-in/m-p/5841507#M1318065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may define the table like this.  But be advised there is a limitation to the number of single values that you can add to the table and use in the IN operator of a SELECT statement.  The only work around for this is to use a RANGE between set numbers or incorporate an exclusion as well.  I think the limit is between 750 and 900.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Types: Begin of t_sv,
              sign(1) type c,
              option(2) type c,
              low(20) type c,
              high(20) type c,
            end of t_sv.
data: lt_singlevalues type table of t_sv.
data: ls_singlevalues like line of lt_singlevalues.


ls_singlevalues-sign = 'I'.
ls_singlevalues-option = 'EQ'.
ls_singlevalues-low = '1000'.
append ls_singlevalues to t_singlevalues.
ls_singlevalues-low = '2000'.
append ls_singlevalues to t_singlevalues.
ls_singlevalues-low = 3000'.
append ls_singlevalues to t_singlevalues.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the LOW and HIGH fields can be a specific type, like if you needed the length to be 30, you can modifiy it, but the SIGN and OPTION fields must be char 1, and char 2 fields respecfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regads,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rich Heilman on Jul 7, 2009 2:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2009 18:51:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-with-in/m-p/5841507#M1318065</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2009-07-07T18:51:51Z</dc:date>
    </item>
  </channel>
</rss>

