<?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: Internal table multiple condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013110#M958880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's incorrect. The IN form that you used is valid only in SELECT commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to do like follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
  lr_ws_channel LIKE RANGE OF ws_channel,
  ls_ws_channel LIKE LINE OF lr_ws_channel.

  ls_ws_channel-option = 'I'.
  ls_ws_channel-sign = 'EQ'.
  ls_ws_channel-low = '10'.
  APPEND ls_ws_channel to lr_ws_channel.

  ls_ws_channel-low = '20'.
  APPEND ls_ws_channel to lr_ws_channel.

  IF ( WS_CHANNEL IN LR_WS_CHANNEL )...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In you case you'll need two range tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF ( WS_CHANNEL = '10' OR WS_CHANNEL = '11' ) OR 
  ( ( WS_CHANNEL = '50' OR WS_CHANNEL = '60' ) AND ITAB-LOC = '4058' ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jun 2008 18:03:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-17T18:03:02Z</dc:date>
    <item>
      <title>Internal table multiple condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013108#M958878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In internal table , the following syntax whether correct or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF( WS_CHANNEL IN ( '10','11') or ( ws_channel in ('50','60') and itab-loc = '4058')).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do the needful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;R.Rajendran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 17:42:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013108#M958878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T17:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table multiple condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013109#M958879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It depends on what you want to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently the if statement is true for the following 4 scenarios.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- if ws_channel = 10&lt;/P&gt;&lt;P&gt;- if ws_channel = 11&lt;/P&gt;&lt;P&gt;- if ws_channel = 50 AND itab-loc = 4058&lt;/P&gt;&lt;P&gt;- if ws_channel = 60 AND itab-loc = 4058&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that what you intend to do? If not please give a little more details on what your exact requirements are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 18:02:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013109#M958879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T18:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table multiple condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013110#M958880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's incorrect. The IN form that you used is valid only in SELECT commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to do like follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
  lr_ws_channel LIKE RANGE OF ws_channel,
  ls_ws_channel LIKE LINE OF lr_ws_channel.

  ls_ws_channel-option = 'I'.
  ls_ws_channel-sign = 'EQ'.
  ls_ws_channel-low = '10'.
  APPEND ls_ws_channel to lr_ws_channel.

  ls_ws_channel-low = '20'.
  APPEND ls_ws_channel to lr_ws_channel.

  IF ( WS_CHANNEL IN LR_WS_CHANNEL )...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In you case you'll need two range tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF ( WS_CHANNEL = '10' OR WS_CHANNEL = '11' ) OR 
  ( ( WS_CHANNEL = '50' OR WS_CHANNEL = '60' ) AND ITAB-LOC = '4058' ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 18:03:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013110#M958880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T18:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table multiple condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013111#M958881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear michel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to do the following two condition in the internal after population from the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)  ws_channel = 10 or 11 or 12 or 40&lt;/P&gt;&lt;P&gt;     ( without any other checking )&lt;/P&gt;&lt;P&gt;2) the above condition or &lt;/P&gt;&lt;P&gt;    itab-loc = 4058 and ws_channel = 50 or 60 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above two condition should come in the single statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please do the needful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;R.Rajendran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 18:06:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013111#M958881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T18:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table multiple condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013112#M958882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajender,&lt;/P&gt;&lt;P&gt;Yes  this cannot be possible with the workarea. IN Operator is not allowd in the internal table.&lt;/P&gt;&lt;P&gt;Instead of passing the hardcoded value why dont you try with the Ranges.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the sample program for you.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  ZCC_TEST.


data:  begin of it_final occurs 0,
  matnr type mara-matnr,
end of it_final.


it_final-matnr = '101'.
append it_final.
it_final-matnr = '102'.
append it_final.

it_final-matnr = '103'.
append it_final.

it_final-matnr = '104'.
append it_final.
ranges: r_matnr for mara-matnr.

r_matnr-option = 'EQ'.
r_matnr-sign = 'I'.
r_matnr-low  = '101'.
append r_matnr.

r_matnr-option = 'EQ'.
r_matnr-sign = 'I'.
r_matnr-low  = '10'.
append r_matnr.

loop at it_final.
 if it_final-matnr in r_matnr.
  write:/ 'Found'.
 endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;******** Reward Point if helpful***********&amp;amp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 18:08:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013112#M958882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T18:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table multiple condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013113#M958883</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; do this way ...&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF( ( WS_CHANNEL = '10' or  WS_CHANNEL = '11' ) or 
 ( ( ws_channel = 50 or ws_channel = '60') and itab-loc = '4058') ) ).

ENDIF. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 18:11:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-multiple-condition/m-p/4013113#M958883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T18:11:26Z</dc:date>
    </item>
  </channel>
</rss>

