<?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: Select-options validation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143722#M747307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Naseer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code it may help full.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables spfli.&lt;/P&gt;&lt;P&gt;data w_carrid type spfli-carrid.&lt;/P&gt;&lt;P&gt;select-options s_carrid for spfli-carrid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen on s_carrid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at s_carrid.&lt;/P&gt;&lt;P&gt;if s_carrid-low is not initial.&lt;/P&gt;&lt;P&gt;  select single carrid&lt;/P&gt;&lt;P&gt;      into w_carrid&lt;/P&gt;&lt;P&gt;     from spfli&lt;/P&gt;&lt;P&gt;    where carrid eq s_carrid-low&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;  clear w_carrid.&lt;/P&gt;&lt;P&gt;  message e015  (  Error message here)&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if s_carrid-high is not initial.&lt;/P&gt;&lt;P&gt;  select single carrid&lt;/P&gt;&lt;P&gt;      into w_carrid&lt;/P&gt;&lt;P&gt;     from spfli&lt;/P&gt;&lt;P&gt;    where carrid eq s_carrid-high&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;  clear w_carrid.&lt;/P&gt;&lt;P&gt;  message e015  (  Error message here)&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;Plzz Reward if it is Useful,&lt;/P&gt;&lt;P&gt;Mahi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Dec 2007 05:46:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-09T05:46:03Z</dc:date>
    <item>
      <title>Select-options validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143716#M747301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select-options: s_kunnr for kna1-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my requirement I need to validate the above selection-screen parameters (i.e. s_kna1-low and s_kna1-high contained in database or not). Can anybody give the logic for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naseer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Dec 2007 11:33:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143716#M747301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-08T11:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143717#M747302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the At selection-screen event write select single queries as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data: gv_kunnr_low type kna1-kunnr.
Select Single kunnr from KNA1 into gv_kunnr_low where kunnr = s_kunnr-low.
if sy-subrc &amp;lt;&amp;gt; 0.
 error message.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same as for high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Dec 2007 11:37:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143717#M747302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-08T11:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143718#M747303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi nasser,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will be writing select query depending up on ur select-options field. There you can validate as per given input values if the select qurey is fecting values into internal table it is ok if not the value donest exits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select-options: S_kunnr for kna1-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from KNA1 into table itab where kunnr in s_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;IF NOT ITAB IS INITIAL .&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;loop at itab&lt;/P&gt;&lt;P&gt;write: itab-kunnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;message E001 with 'NO RECORDS AVAILABLE FOR GIVEN INPUT'.&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;Hope this will help u.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward if useful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sunil kairam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Dec 2007 11:42:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143718#M747303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-08T11:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143719#M747304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naseer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check sy-subrc after the select statement if its success then proceed else thrw a  error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For e.g &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;AT SELECTION-SCREEN ON S_KUNNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select single kunnr from kna 1 &lt;/P&gt;&lt;P&gt;   into loc_variable&lt;/P&gt;&lt;P&gt;     where kunnr in s_kunnr.&lt;/P&gt;&lt;P&gt; if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;   Write : 'No data'.&lt;/P&gt;&lt;P&gt; else.&lt;/P&gt;&lt;P&gt;  ..........&lt;/P&gt;&lt;P&gt;  ..........&lt;/P&gt;&lt;P&gt; ...........   (Your Coding).&lt;/P&gt;&lt;P&gt;Endif.&amp;lt;/b&amp;gt;           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do it like this you  will get error message if it error else you will proceed with your coding.&lt;/P&gt;&lt;P&gt;Hope its useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sakthi C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;&lt;/STRONG&gt;&lt;DEL&gt;&lt;STRONG&gt;Rewards if useful&lt;/STRONG&gt;&lt;/DEL&gt;*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Dec 2007 11:44:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143719#M747304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-08T11:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143720#M747305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try &lt;/P&gt;&lt;P&gt;     select single * from kna1 where kunnr in s_kunnr.&lt;/P&gt;&lt;P&gt;     if sy-subrc eq 0 , then atleast one entry is there in your select option that is valid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You shouldn't just check the high and low parameter.&lt;/P&gt;&lt;P&gt;&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;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Dec 2007 11:44:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143720#M747305</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2007-12-08T11:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143721#M747306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tables :&lt;/P&gt;&lt;P&gt;  spfli.&lt;/P&gt;&lt;P&gt;  select-options:&lt;/P&gt;&lt;P&gt;    s_carr for spfli-carrid.&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  i guess this code will solve ur problem.&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;   it_tab like table of spfli with header line.&lt;/P&gt;&lt;P&gt;   select *&lt;/P&gt;&lt;P&gt;     from spfli&lt;/P&gt;&lt;P&gt;     into table it_tab&lt;/P&gt;&lt;P&gt;     where carrid gt s_carr-low&lt;/P&gt;&lt;P&gt;      and  carrid le s_carr-high.&lt;/P&gt;&lt;P&gt;      if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;       loop at it_tab.&lt;/P&gt;&lt;P&gt;        write: it_tab-carrid.&lt;/P&gt;&lt;P&gt;        endloop.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;plzz reward points if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Dec 2007 11:48:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143721#M747306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-08T11:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143722#M747307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Naseer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code it may help full.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables spfli.&lt;/P&gt;&lt;P&gt;data w_carrid type spfli-carrid.&lt;/P&gt;&lt;P&gt;select-options s_carrid for spfli-carrid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen on s_carrid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at s_carrid.&lt;/P&gt;&lt;P&gt;if s_carrid-low is not initial.&lt;/P&gt;&lt;P&gt;  select single carrid&lt;/P&gt;&lt;P&gt;      into w_carrid&lt;/P&gt;&lt;P&gt;     from spfli&lt;/P&gt;&lt;P&gt;    where carrid eq s_carrid-low&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;  clear w_carrid.&lt;/P&gt;&lt;P&gt;  message e015  (  Error message here)&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if s_carrid-high is not initial.&lt;/P&gt;&lt;P&gt;  select single carrid&lt;/P&gt;&lt;P&gt;      into w_carrid&lt;/P&gt;&lt;P&gt;     from spfli&lt;/P&gt;&lt;P&gt;    where carrid eq s_carrid-high&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;  clear w_carrid.&lt;/P&gt;&lt;P&gt;  message e015  (  Error message here)&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;Plzz Reward if it is Useful,&lt;/P&gt;&lt;P&gt;Mahi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Dec 2007 05:46:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-validation/m-p/3143722#M747307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-09T05:46:03Z</dc:date>
    </item>
  </channel>
</rss>

