<?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: selection screen validations in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434354#M824795</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;write those in between chain and endchain if error comes throw error msg..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then these fileds will still be open for input..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 14, 2008 12:38 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Feb 2008 11:06:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-14T11:06:42Z</dc:date>
    <item>
      <title>selection screen validations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434353#M824794</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;please tell me how io write code for screen validation.&lt;/P&gt;&lt;P&gt;i have vendor number (LFB1-LIFNR) and bukrs (LFB1-BUKRS) IN SELECTION SCREEN  this are select options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we enter incorrect vendor it need to display invald vendor and for bukrs invalid company code..&lt;/P&gt;&lt;P&gt;do we need to create message for it . please explain how to write,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if no data found for that company code and vendor.&lt;/P&gt;&lt;P&gt;it need to display no data found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its urgent. &lt;/P&gt;&lt;P&gt;please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 11:03:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434353#M824794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T11:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen validations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434354#M824795</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;write those in between chain and endchain if error comes throw error msg..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then these fileds will still be open for input..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 14, 2008 12:38 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 11:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434354#M824795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T11:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen validations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434355#M824796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt;   select LIFNR&lt;/P&gt;&lt;P&gt;     from  LFB1&lt;/P&gt;&lt;P&gt;      into table &lt;/P&gt;&lt;P&gt;    where lifnr in s_lifnr.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;  message e888(sabapdocu) with 'no number found'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;in this way u can write the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 14, 2008 12:38 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 11:12:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434355#M824796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T11:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen validations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434356#M824797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try this format..&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1.&lt;/P&gt;&lt;P&gt;parameters: p_datum1 type sy-datum,&lt;/P&gt;&lt;P&gt;p_datum2 type sy-datum.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_datum1 is initial&lt;/P&gt;&lt;P&gt;and p_datum2 is initial.&lt;/P&gt;&lt;P&gt;message e001(00) with 'Enter at least one date'.&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;in se91 T-Code you can create message and that number you can use after &lt;/P&gt;&lt;P&gt;Message &lt;/P&gt;&lt;P&gt;command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 11:12:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434356#M824797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T11:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen validations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434357#M824798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;let s_vendor and s_burks be those 2 sel-options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables: lfa1,t001.

at selection-SCREEN on s_vendor.
select * from lfa1 where lifnr = s_vendor.
if sy-subrc is not initial.
message.................
endif.

at selection-SCREEN on s_burks.
select * from t001 where burks = s_burks.
if sy-subrc is not initial.
message.................
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 11:15:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434357#M824798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T11:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen validations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434358#M824799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dude,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You should use the AT SELECTION-SCREEN event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if s_lifnr not in ('0001',.......).&lt;/P&gt;&lt;P&gt;  message E100 with s_lifnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if s_bukrs not in ('1000',....).&lt;/P&gt;&lt;P&gt; message E101 with s_bukrs.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from lfb1 &lt;/P&gt;&lt;P&gt; into table it_lfb1&lt;/P&gt;&lt;P&gt;  where lifnr = s_lifnr and&lt;/P&gt;&lt;P&gt;          bukrs = s_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt; MESSAGE I102 with s_lifnr s_bukrs.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see these validations check for the value to be in a specific &lt;/P&gt;&lt;P&gt;set of alternatives.If the values' attributes doesn't match the &lt;/P&gt;&lt;P&gt;variables' attributes then the system will automaticlly generate a  message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To issue messages you shoud add the message-class addition to the report statement as below,&lt;/P&gt;&lt;P&gt;report zxxxxxxxx message-class zmsgxxx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;double click on the zmsgxxx and &lt;/P&gt;&lt;P&gt;write messages as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;msg-no        desc.,&lt;/P&gt;&lt;P&gt;100              &amp;amp; not a valid vendor&lt;/P&gt;&lt;P&gt;101              &amp;amp; not a valid company code&lt;/P&gt;&lt;P&gt;102              No records found for vendor &amp;amp;   and company &lt;/P&gt;&lt;P&gt;                   code &amp;amp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ampersands are place holders for values.&lt;/P&gt;&lt;P&gt;They are specified at run-time with the 'WITH' addition.&lt;/P&gt;&lt;P&gt;eg., with s_lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the E &amp;amp; I before the message nos denote the message types&lt;/P&gt;&lt;P&gt;which decided the time or place of message issual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any clearance needed please share it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmanan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 14, 2008 12:40 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 11:30:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validations/m-p/3434358#M824799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T11:30:10Z</dc:date>
    </item>
  </channel>
</rss>

