<?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: multiple selection values variable in select statement..help needed in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664508#M294295</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;ranges: r_errmsg for &amp;lt;table&amp;gt;-err_msg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*fill the ranges from the multiple values you have(Assuming that you have them in an itab).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itabe.&lt;/P&gt;&lt;P&gt;r_errmsg-low = itab-msg.&lt;/P&gt;&lt;P&gt;r_errmsg-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_errmsg-option = 'EQ'.&lt;/P&gt;&lt;P&gt;append r_errmsg.&lt;/P&gt;&lt;P&gt;endloop.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;select .........&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;.........&lt;/P&gt;&lt;P&gt;fields...&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;from 'table'&lt;/P&gt;&lt;P&gt;where ERR_MSG &amp;lt;b&amp;gt;in r_errmsg.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Nov 2006 14:55:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-20T14:55:45Z</dc:date>
    <item>
      <title>multiple selection values variable in select statement..help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664502#M294289</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;          i have a select statement where i have multiple values for one field.....&lt;/P&gt;&lt;P&gt;like as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select .........&lt;/P&gt;&lt;P&gt;             ........&lt;/P&gt;&lt;P&gt;              .........&lt;/P&gt;&lt;P&gt;              fields...&lt;/P&gt;&lt;P&gt;             .......&lt;/P&gt;&lt;P&gt;             ........&lt;/P&gt;&lt;P&gt;   from 'table'&lt;/P&gt;&lt;P&gt;  where ERR_MSG     =     HERE FOR THIS FIELD I HAVE MULTIPLE VALUES.&lt;/P&gt;&lt;P&gt;  now i want all the data from table in which these values are there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please, can anyone help me........ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 14:51:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664502#M294289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T14:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: multiple selection values variable in select statement..help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664503#M294290</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;Just declare a ranges field. Fill ur values in ranges and in where clause pass this as,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where err_msg in &amp;lt;declared range&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;ranges : range1 for CHAR10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;range1-sign = 'I'.&lt;/P&gt;&lt;P&gt;range1-option = 'EQ'.&lt;/P&gt;&lt;P&gt;range1-low = 'Err VAlue'1.&lt;/P&gt;&lt;P&gt;append range1. &lt;/P&gt;&lt;P&gt;clear Range 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;range1-sign = 'I'.&lt;/P&gt;&lt;P&gt;range1-option = 'EQ'.&lt;/P&gt;&lt;P&gt;range1-low = 'Err VAlue2'.&lt;/P&gt;&lt;P&gt;append range1. &lt;/P&gt;&lt;P&gt;clear Range 1.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In where clause give, &lt;/P&gt;&lt;P&gt;where err_msg in range1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sreedhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 14:54:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664503#M294290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T14:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: multiple selection values variable in select statement..help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664504#M294291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create a range for this field ERR_MSG and populate all the applicable values. Then use that range in select statement.&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;where ERR_MSG  IN r_err_msg&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 14:54:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664504#M294291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T14:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: multiple selection values variable in select statement..help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664505#M294292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ganesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. now i want all the data from table in which these values are there.&lt;/P&gt;&lt;P&gt;   and then use FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Put all these values, in one internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.  use this sample program (just copy paste)&lt;/P&gt;&lt;P&gt;it will fetch data&lt;/P&gt;&lt;P&gt;from T001&lt;/P&gt;&lt;P&gt;FOR ONLY TWO COMPANIES (as mentioned in itab)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;bukrs LIKE t001-bukrs,&lt;/P&gt;&lt;P&gt;END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-bukrs = '1000'.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;itab-bukrs = '1100'.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM t001&lt;/P&gt;&lt;P&gt;INTO TABLE t001&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN itab&lt;/P&gt;&lt;P&gt;WHERE bukrs = itab-bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------" /&gt;&lt;P&gt;LOOP AT t001.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; t001-bukrs.&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;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 14:55:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664505#M294292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T14:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: multiple selection values variable in select statement..help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664506#M294293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ganesh,&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;where  field  in ('1', '2', '3').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or take a range variable.&lt;/P&gt;&lt;P&gt;append all the values into that variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where field in r_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Anu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 14:55:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664506#M294293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T14:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: multiple selection values variable in select statement..help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664507#M294294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; you can declare a variable as ranges. and use the same as select-options.&lt;/P&gt;&lt;P&gt;the syntax is &lt;/P&gt;&lt;P&gt;ranges: a type vbrk-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can use this in the select staements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for mor details.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/18/a1f251e28b11d295f500a0c929b3c3/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/18/a1f251e28b11d295f500a0c929b3c3/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 14:55:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664507#M294294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T14:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: multiple selection values variable in select statement..help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664508#M294295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;ranges: r_errmsg for &amp;lt;table&amp;gt;-err_msg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*fill the ranges from the multiple values you have(Assuming that you have them in an itab).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itabe.&lt;/P&gt;&lt;P&gt;r_errmsg-low = itab-msg.&lt;/P&gt;&lt;P&gt;r_errmsg-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_errmsg-option = 'EQ'.&lt;/P&gt;&lt;P&gt;append r_errmsg.&lt;/P&gt;&lt;P&gt;endloop.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;select .........&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;.........&lt;/P&gt;&lt;P&gt;fields...&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;from 'table'&lt;/P&gt;&lt;P&gt;where ERR_MSG &amp;lt;b&amp;gt;in r_errmsg.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 14:55:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664508#M294295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T14:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: multiple selection values variable in select statement..help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664509#M294296</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;  declare one range for that field and use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : begin of r_errors occurs 0,
            sign(1),
            option(2),
            low like ztable-err_msg,
            high like ztable-err_msg,
          end of r_errors.

r_errors-low-sign = 'I'.
r_errors-option = 'BT'.
r_errors-low =  'Error message 1'.  " specify ur error message her
r_errors-high = ''.
append r_errors.
clear r_errors-low.

r_errors-low-sign = 'I'.
r_errors-option = 'BT'.
r_errors-low =  'Error message 2'.
r_errors-high = ''.
append r_errors.
clear r_errors-low.

select .........
........
.........
fields...
.......
........
from 'table'
where ERR_MSG&amp;lt;b&amp;gt; in r_errors.&amp;lt;/b&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 14:57:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-selection-values-variable-in-select-statement-help-needed/m-p/1664509#M294296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T14:57:34Z</dc:date>
    </item>
  </channel>
</rss>

