<?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: Validating a select-option in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-a-select-option/m-p/1486653#M227055</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try your example in this format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the example, ijn which I am checking that the user can't enter the value which is outside the range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT s_glacc-low IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE kstar INTO v_kstar FROM csku&lt;/P&gt;&lt;P&gt;                        WHERE kstar = s_glacc-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      IF NOT s_glacc-high IS INITIAL.&lt;/P&gt;&lt;P&gt;        SELECT SINGLE kstar INTO v_kstar FROM csku&lt;/P&gt;&lt;P&gt;                            WHERE kstar = s_glacc-high.&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE e006." WITH 'Enter Correct G/L Account Number High Value'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      MESSAGE e007." WITH 'Enter Correct G/L Account Number Low Value'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sushil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Sep 2006 11:58:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-05T11:58:31Z</dc:date>
    <item>
      <title>Validating a select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-a-select-option/m-p/1486652#M227054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my progrma I have a select-option as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;s_emp FOR knvv-kunnr 
          MATCHCODE OBJECT ZLG_EMP_REG_SEARCHHELP&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The matchcode retricts the search help list to a sub-set of customers on the KNVV table where their KUNNR is between 1000000 and 4000000 inclusive.  However, it is possible (and desirable) for users to type in a range or multiple selection in the select-option and therefore possible (but un-desirable) for them to enter values outside this range.  Does anybody know of a simple way of checking that the parameters in the select-option will not result in KUNNR values that fall outside this range?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 11:48:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-a-select-option/m-p/1486652#M227054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-05T11:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Validating a select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-a-select-option/m-p/1486653#M227055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try your example in this format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the example, ijn which I am checking that the user can't enter the value which is outside the range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT s_glacc-low IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE kstar INTO v_kstar FROM csku&lt;/P&gt;&lt;P&gt;                        WHERE kstar = s_glacc-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      IF NOT s_glacc-high IS INITIAL.&lt;/P&gt;&lt;P&gt;        SELECT SINGLE kstar INTO v_kstar FROM csku&lt;/P&gt;&lt;P&gt;                            WHERE kstar = s_glacc-high.&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE e006." WITH 'Enter Correct G/L Account Number High Value'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      MESSAGE e007." WITH 'Enter Correct G/L Account Number Low Value'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sushil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 11:58:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-a-select-option/m-p/1486653#M227055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-05T11:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Validating a select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-a-select-option/m-p/1486654#M227056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    use below logic.&lt;/P&gt;&lt;P&gt;     ranges:r_kunnr for knvv-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     initialization;.&lt;/P&gt;&lt;P&gt;      r_kunnr-sign = 'I'.&lt;/P&gt;&lt;P&gt;      r_kunnr-option = 'BT'.   &lt;/P&gt;&lt;P&gt;      r_kunnr-low = 1000000.&lt;/P&gt;&lt;P&gt;      r_kunnr-high = 4000000 .&lt;/P&gt;&lt;P&gt;      append r_kunnr.&lt;/P&gt;&lt;P&gt;    At selction screen.&lt;/P&gt;&lt;P&gt;      read table r_kunnr index 1.&lt;/P&gt;&lt;P&gt;       if not s_emp[] is initial.&lt;/P&gt;&lt;P&gt;         delete s_emp where not low in r_kunnr-low.&lt;/P&gt;&lt;P&gt;         if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;          message 'invalid range'.&lt;/P&gt;&lt;P&gt;         endif.  &lt;/P&gt;&lt;P&gt;       delete s_emp where not high in r_kunnr-high.&lt;/P&gt;&lt;P&gt;         if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;          message 'invalid range'.&lt;/P&gt;&lt;P&gt;         endif.  &lt;/P&gt;&lt;P&gt;      endif. &lt;/P&gt;&lt;P&gt; Regards&lt;/P&gt;&lt;P&gt;Amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 12:13:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-a-select-option/m-p/1486654#M227056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-05T12:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Validating a select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-a-select-option/m-p/1486655#M227057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I opted for Amole's solution as it didn't involve any reads of the database.  However, I modified it so that it doesn't delete the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 15:49:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-a-select-option/m-p/1486655#M227057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-05T15:49:26Z</dc:date>
    </item>
  </channel>
</rss>

