<?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: Need logic for accessing select options internal table values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304225#M1223257</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The select options internal table would have this value : sign - I, option - BT, low - 401, high - 503.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we use range 401 and 503 all values between the range will be taken say 499 also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So take 401, 402, 403, 404, 501 values into an internal table say --&amp;gt;itab with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;At selection-screen.
If S_field-low GE 401 and S_field-HIGH LE 503.
Loop at S_fields.
Read table itab with key = S_field-low.
IF sy-subrc ne 0.
S_field-low = ' '.
ENDIF.
Read table itab with key = S_field-high.
IF sy-subrc ne 0.
S_field-HIGH= ' '.
ENDIF.
Modify s_field.
ENDLOOP.
ELSE.
Message 'ERROR' TYPE 'E'.
ENDIF.&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;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2009 06:07:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-18T06:07:08Z</dc:date>
    <item>
      <title>Need logic for accessing select options internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304221#M1223253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am developing a sales report. In this report, I am giving for e.g. subfamily code as input. The user wants the input field with intervals and with extension as it is always in standard sap reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is that I need to restrict this selection only for particular sub-family codes i.e. 401, 402, 403, 404, 501. suppose if the user enters 401 to 503.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The select options internal table would have this value : sign - I, option - BT, low - 401, high - 503.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, now I need to validate this range of values, whether it contains any of the pre-defined sub-family codes i.e. 401, 402, 403, 404, 501).&lt;/P&gt;&lt;P&gt;And, I have to display an error if it doent contain pre-defined sub-family codes (i.e. 401, 402, 403, 404, 501).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do this.....Please suggest me logic and also if possible let me know if there is any special keywords to loop/access select options internal table values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 05:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304221#M1223253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T05:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic for accessing select options internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304222#M1223254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt;loop at select-option (its a table be default).&lt;/P&gt;&lt;P&gt;cehck for entries for both select-low and select-high with the predefoned values.&lt;/P&gt;&lt;P&gt;if not found ==&amp;gt; ERROR&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;continue.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 05:54:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304222#M1223254</guid>
      <dc:creator>Sandeep_Panghal</dc:creator>
      <dc:date>2009-03-18T05:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic for accessing select options internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304223#M1223255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I always create another ranges table, and select from the master data table of this check field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: rwerks TYPE RANGES OF werks_d.&lt;/P&gt;&lt;P&gt;DATA wwerks LIKE LINE OF rwerks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wwerks-sign = 'I'.&lt;/P&gt;&lt;P&gt;wwerks-option = 'EQ'.&lt;/P&gt;&lt;P&gt;SELECT werks AS low FROM t001w INTO wwerks-low WHERE werks IN s_werks.&lt;/P&gt;&lt;P&gt;  AUTHORITY-CHECK....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    MESSAGE 'Contain illigal data!' TYPE 'E'.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    APPEND wwerks TO rwersk.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 06:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304223#M1223255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T06:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic for accessing select options internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304224#M1223256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a special keyword to access the select-options in loop or select-queries....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the keyword is 'IN'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the condition just mention it in this way....&lt;/P&gt;&lt;P&gt;where sub-family IN select-option..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for negation you can use...&lt;/P&gt;&lt;P&gt;where sub-family NOT IN select-option.&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;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 06:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304224#M1223256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T06:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic for accessing select options internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304225#M1223257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The select options internal table would have this value : sign - I, option - BT, low - 401, high - 503.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we use range 401 and 503 all values between the range will be taken say 499 also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So take 401, 402, 403, 404, 501 values into an internal table say --&amp;gt;itab with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;At selection-screen.
If S_field-low GE 401 and S_field-HIGH LE 503.
Loop at S_fields.
Read table itab with key = S_field-low.
IF sy-subrc ne 0.
S_field-low = ' '.
ENDIF.
Read table itab with key = S_field-high.
IF sy-subrc ne 0.
S_field-HIGH= ' '.
ENDIF.
Modify s_field.
ENDLOOP.
ELSE.
Message 'ERROR' TYPE 'E'.
ENDIF.&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;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 06:07:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304225#M1223257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T06:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic for accessing select options internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304226#M1223258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qiang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem arises if user enters multiple/range inputs i.e. subfam-sign = I; subfam-option = BT ; subfam-low = 401; subfam-high = 503.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Rajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 06:15:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304226#M1223258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T06:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic for accessing select options internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304227#M1223259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this out:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AT SELECTION-SCREEN ON &amp;lt;select-options&amp;gt;.

  IF NOT ( '401' IN &amp;lt;select-options&amp;gt; AND '402' IN &amp;lt;select-options&amp;gt;
               '403' IN  &amp;lt;select-options&amp;gt; AND '404' IN &amp;lt;select-options&amp;gt;
               '501' IN  &amp;lt;select-options&amp;gt; ).

* Issue your error message over here.

  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lim...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 06:17:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304227#M1223259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T06:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic for accessing select options internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304228#M1223260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT S_BUKRS.&lt;/P&gt;&lt;P&gt; IF S_BUKRS-LOW  GE '401'  AND S_BUKRS-HIGH LE '503'.&lt;/P&gt;&lt;P&gt; ELSE. &lt;/P&gt;&lt;P&gt;    MESSAGE ID 'ZMSG1' TYPE 'E' WITH TEXT-001.&lt;/P&gt;&lt;P&gt; ENDIF.&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;Joan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 06:19:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304228#M1223260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T06:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic for accessing select options internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304229#M1223261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot! Ruslim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your suggestion solved my problem. Awarding you max points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 09:22:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-for-accessing-select-options-internal-table-values/m-p/5304229#M1223261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T09:22:44Z</dc:date>
    </item>
  </channel>
</rss>

