<?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: case with a select-options in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-with-a-select-options/m-p/1260050#M147331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure that a select-option is the best way to handle this.  Are you forcing that the user only inputs single values or are you allow ranges. If you are allowing ranges, not sure that is a good idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Mar 2006 01:40:05 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-03-28T01:40:05Z</dc:date>
    <item>
      <title>case with a select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-with-a-select-options/m-p/1260049#M147330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;How do I use the CASE statement when the variable is a range (so_mes).&lt;/P&gt;&lt;P&gt;so_mes is defined like a select-options.&lt;/P&gt;&lt;P&gt;i have the next code.&lt;/P&gt;&lt;P&gt; case so_mes-low.&lt;/P&gt;&lt;P&gt;             when '01'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp01 to oejer.&lt;/P&gt;&lt;P&gt;              when '02'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp02 to oejer.&lt;/P&gt;&lt;P&gt;              when '03'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp03 to oejer.&lt;/P&gt;&lt;P&gt;              when '04'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp04 to oejer.&lt;/P&gt;&lt;P&gt;              when '05'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp05 to oejer.&lt;/P&gt;&lt;P&gt;              when '06'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp06 to oejer.&lt;/P&gt;&lt;P&gt;              when '07'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp07 to oejer.&lt;/P&gt;&lt;P&gt;              when '08'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp08 to oejer.&lt;/P&gt;&lt;P&gt;              when '09'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp09 to oejer.&lt;/P&gt;&lt;P&gt;              when '10'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp10 to oejer.&lt;/P&gt;&lt;P&gt;              when '11'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp11 to oejer.&lt;/P&gt;&lt;P&gt;              when '12'.&lt;/P&gt;&lt;P&gt;                move dobli-wtp12 to oejer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this case only take the low value. How can I asigned the the high value in the statement CASE?.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2006 01:33:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-with-a-select-options/m-p/1260049#M147330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-28T01:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: case with a select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-with-a-select-options/m-p/1260050#M147331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure that a select-option is the best way to handle this.  Are you forcing that the user only inputs single values or are you allow ranges. If you are allowing ranges, not sure that is a good idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2006 01:40:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-with-a-select-options/m-p/1260050#M147331</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-28T01:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: case with a select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-with-a-select-options/m-p/1260051#M147332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest doing something like this.  Allow the user to enter only single values in the select-option, then you can loop at the select-option and process accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

* Type pools
type-pools: slis, sscr.

data: char2(2) type c.

select-options: so_mes for char2.


initialization.
  perform initilization.

start-of-selection.

  loop at so_mes.

    case so_mes-low.
      when '01'.
*move dobli-wtp01 to oejer.
      when '02'.
*move dobli-wtp02 to oejer.
      when '03'.
*move dobli-wtp03 to oejer.
      when '04'.
*move dobli-wtp04 to oejer.

    endcase.

  endloop.



************************************************************************
*  INITILIZATION
************************************************************************
form initilization.

* Restrict the select options for SO_MES
* to just a date range
  data: selopt   type sscr_ass,
        opt_list type sscr_opt_list,
        restrict type sscr_restrict.

  clear opt_list.
  opt_list-name          = 'EQ'.
  opt_list-options-eq    = 'X'.
  append opt_list to restrict-opt_list_tab.

  clear selopt.
  selopt-kind            = 'S'.
  selopt-name            = 'SO_MES'.
  selopt-sg_main         = 'I'.
  selopt-sg_addy         = ' '.
  selopt-op_main         = 'EQ'.
  selopt-op_addy         = 'EQ'.
  append selopt  to restrict-ass_tab.

  call function 'SELECT_OPTIONS_RESTRICT'
       exporting
            restriction            = restrict
       exceptions
            too_late               = 1
            repeated               = 2
            selopt_without_options = 5
            selopt_without_signs   = 6
            invalid_sign           = 7
            empty_option_list      = 9
            invalid_kind           = 10
            repeated_kind_a        = 11
            others                 = 12.


endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2006 01:49:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-with-a-select-options/m-p/1260051#M147332</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-28T01:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: case with a select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-with-a-select-options/m-p/1260052#M147333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your question is not clear. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want to do a 'case' on only the so_mes-high? If so you can code it exactly as for the low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or do you want to include both low and high in a 'case'?&lt;/P&gt;&lt;P&gt;Although it syntax checks I don't think you can have something like:&lt;/P&gt;&lt;P&gt;case so_mes.&lt;/P&gt;&lt;P&gt; when '01'.&lt;/P&gt;&lt;P&gt; when '02'.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why not just use an 'if'?&lt;/P&gt;&lt;P&gt;if '01' in so_mes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif '02' in so_mes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give us more info if I haven't guessed what you are asking properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2006 03:09:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-with-a-select-options/m-p/1260052#M147333</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-03-28T03:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: case with a select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-with-a-select-options/m-p/1260053#M147334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marisol,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you pls explain your question more clearly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can very well use so_mes-high in the same way as u have used for so_mes-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;b&amp;gt;case so_mes-high.&amp;lt;/b&amp;gt;
when '01'.
move dobli-wtp01 to oejer.
when '02'.
move dobli-wtp02 to oejer.
when '03'.
move dobli-wtp03 to oejer.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anjali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2006 03:31:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-with-a-select-options/m-p/1260053#M147334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-28T03:31:42Z</dc:date>
    </item>
  </channel>
</rss>

