<?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: Convert Select Option to Range table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406480#M1241639</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;loop at itab into watab  where mrpfield in s_dispo.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Process the steps here&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jayati Saha on Apr 9, 2009 8:24 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Apr 2009 06:21:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-09T06:21:53Z</dc:date>
    <item>
      <title>Convert Select Option to Range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406478#M1241637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody will suggest me how to convert the selection screen values in range table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to convert the select option value in range table. Then I have one internal table &amp;amp; in that loop I would like to compare a particular value with this range table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select option S_DISPO having value 'D01' to 'D05'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my internal table ITAB, having field MRP controller field having entries D01, D05, D09, D11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I would like to loop over itab &amp;amp; just wanted to consider only those records which is having values as in select option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion will be highly appriciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 06:19:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406478#M1241637</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-09T06:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Select Option to Range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406479#M1241638</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;use this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab into wa where mrp_field in s_dispo.
" processing steps
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 06:21:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406479#M1241638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-09T06:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Select Option to Range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406480#M1241639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;loop at itab into watab  where mrpfield in s_dispo.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Process the steps here&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jayati Saha on Apr 9, 2009 8:24 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 06:21:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406480#M1241639</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-09T06:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Select Option to Range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406481#M1241640</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;PRE&gt;&lt;CODE&gt;DELETE ITAB WHERE NOT  &amp;lt;MRP controller &amp;gt; IN  S_DISPO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 06:29:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406481#M1241640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-09T06:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Select Option to Range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406482#M1241641</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;you can convert select option into range by 2 methods:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA : l_wa_mwskz LIKE LINE OF r_mwskz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;1 method :&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;APPEND LINES OF : s_txcd6 TO r_mwskz.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   here &lt;STRONG&gt;s_txcd6 is select option&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2 method :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;l_wa_mwskz-sign = c_i.
  l_wa_mwskz-option = c_eq.
  l_wa_mwskz-low = c_v0.
  APPEND l_wa_mwskz TO r_mwskz.
  l_wa_mwskz-low = c_v1.
  APPEND l_wa_mwskz TO r_mwskz.
 l_wa_mwskz-low = c_v2.
 APPEND l_wa_mwskz TO r_mwskz.
 l_wa_mwskz-low = c_v3.
  APPEND l_wa_mwskz TO r_mwskz.
  l_wa_mwskz-low = c_v5.
 APPEND l_wa_mwskz TO r_mwskz.
  l_wa_mwskz-low = c_v6.
  APPEND l_wa_mwskz TO r_mwskz.
  l_wa_mwskz-low = c_v7.
  APPEND l_wa_mwskz TO r_mwskz.
  l_wa_mwskz-low = c_v8.
  APPEND l_wa_mwskz TO r_mwskz.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;now here r_mwskz[] is the table which has multiple values&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will help u definately&lt;/P&gt;&lt;P&gt;rahul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: RAHUL SHARMA on Apr 9, 2009 2:31 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: RAHUL SHARMA on Apr 9, 2009 2:32 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 06:31:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406482#M1241641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-09T06:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Select Option to Range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406483#M1241642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can hard code the select option table field sign to bt for all values by looping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at so_var.&lt;/P&gt;&lt;P&gt;so_var-sign = 'BT'.&lt;/P&gt;&lt;P&gt;modify so_var transporting sign.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;lalit mohan gupta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 06:39:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406483#M1241642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-09T06:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Select Option to Range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406484#M1241643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have 2 choices : &lt;/P&gt;&lt;P&gt;1. Either filter the records while selecting from the data base itself :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select * from table into itab where field in s_dispo.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Or Select all data and loop at it and filter or select all data and use delete with where clause.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab into wa where dispo in s_dispo.
endloop.

delete table itab where dispo in so_dispo.  " remember to make the option field of the select option to 'E'

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, please note that as far as possible go with the &lt;STRONG&gt;first option&lt;/STRONG&gt;, it is better from the performance point of view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 06:44:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406484#M1241643</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-09T06:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Select Option to Range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406485#M1241644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the code snippet..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: l_it_tab TYPE TABLE OF ty_tab,
            l_wa_tab TYPE ty_tab.

  DATA: l_wa_dispo LIKE s_dispo,
        l_wa_dispo LIKE s_dispo.

  l_wa_dispo-sign = 'I'.
  l_wa_dispo-option = 'BT'.

  SELECT key1
         field1
         FROM &amp;lt;table name&amp;gt;
         INTO TABLE l_it_tab
         WHERE key1 IN s_dispo.
  IF NOT l_it_tab[] IS INITIAL.
    LOOP AT l_it_tab INTO l_wa_tab.
      l_wa_dispo-low = l_wa_tab-field1.
      APPEND l_wa_dispo TO s_dispo.
      CLEAR l_wa_dispo-low.
    ENDLOOP.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now you can use S_DISPO as a range table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sayak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 06:53:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406485#M1241644</guid>
      <dc:creator>RoySayak</dc:creator>
      <dc:date>2009-04-09T06:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Select Option to Range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406486#M1241645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 07:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406486#M1241645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-09T07:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Select Option to Range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406487#M1241646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Neha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can always read the select options using READ TABLE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: READ TABLE S_DISPO WITH KEY LOW = ITAB-DISPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think, this will solve your problem.&lt;/P&gt;&lt;P&gt;____________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if you want to COPY SELECT OPTIONS S_DISPO INTO RANGES R_DISPO, do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RANGES: R_DISPO FOR MARC-DISPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
R_DISPO[] = S_DISPO[] .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sasidhar Reddy Matli.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 07:15:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-select-option-to-range-table/m-p/5406487#M1241646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-09T07:15:55Z</dc:date>
    </item>
  </channel>
</rss>

