<?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: Validation for Select-Option - Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-for-select-option-issue/m-p/8489254#M1653105</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 try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN on s_field.&lt;/P&gt;&lt;P&gt;LOOP AT s_field.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;  FROM ztable INTO ls_field&lt;/P&gt;&lt;P&gt;  WHERE field EQ s_field-low.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE s398(00) DISPLAY LIKE 'E' with 'ERROR MESSAGE'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this works as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;&amp;lt;point-begging removed&amp;gt;&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Edited by: micky prasad on Jan 6, 2012 1:00 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kishan P on Jan 9, 2012 1:40 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jan 2012 14:13:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-01-04T14:13:40Z</dc:date>
    <item>
      <title>Validation for Select-Option - Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-for-select-option-issue/m-p/8489252#M1653103</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;I have a select-option s_field on which I have written a validation under AT SELECTION-SCREEN. Now, the problem is that, if validation fails in second line of s_field, then to change it when we click on Extension, it's not allowing to enter but is throwing error message again and again as AT SELECTION-SCREEN is called. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose, I have entered 2 single values as C001 and F001. s_field will have 2 entries. Now, C001 is a valid value but F001 is not. PFB my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

LOOP AT s_field.

SELECT SINGLE *
  FROM ztable INTO ls_field
  WHERE field EQ s_field-low.

IF sy-subrc NE 0.
 " Error Message
ENDIF.

ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, for C001, sy-subrc will be 0. But for F001 sy-subrc is 4 and hence will throw an error. Now, to correct this, I am trying to enter into extension, but as this will be called again, I am unable to. Hope I explained it clearly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not see any possibility to correct this. Can anybody please suggest if any workaround can be implemented?&lt;/P&gt;&lt;P&gt;Your help is highly appreciable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 04:39:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-for-select-option-issue/m-p/8489252#M1653103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-03T04:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Validation for Select-Option - Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-for-select-option-issue/m-p/8489253#M1653104</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;For validating the Selection Screen Elements try as follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;At Selection Screen on Input_Field_name&lt;/STRONG&gt; ( ie here give your field name for eg: &lt;STRONG&gt;At selection screen on s_field&lt;/STRONG&gt; ).&lt;/P&gt;&lt;P&gt;under this write your condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;At selection screen on s_field&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;  FROM ztable INTO ls_field&lt;/P&gt;&lt;P&gt;  WHERE field EQ s_field-low.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt; " Error Message&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Renuka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 04:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-for-select-option-issue/m-p/8489253#M1653104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-03T04:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Validation for Select-Option - Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-for-select-option-issue/m-p/8489254#M1653105</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 try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN on s_field.&lt;/P&gt;&lt;P&gt;LOOP AT s_field.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;  FROM ztable INTO ls_field&lt;/P&gt;&lt;P&gt;  WHERE field EQ s_field-low.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE s398(00) DISPLAY LIKE 'E' with 'ERROR MESSAGE'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this works as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;&amp;lt;point-begging removed&amp;gt;&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Edited by: micky prasad on Jan 6, 2012 1:00 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kishan P on Jan 9, 2012 1:40 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 14:13:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-for-select-option-issue/m-p/8489254#M1653105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-04T14:13:40Z</dc:date>
    </item>
  </channel>
</rss>

