<?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 selection-screen validation. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326546#M1030902</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;this my selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH  FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : s_ebeln FOR ekko-ebeln,&lt;/P&gt;&lt;P&gt;                 s_lifnr FOR ekko-lifnr,&lt;/P&gt;&lt;P&gt;                 s_bedat FOR ekko-bedat OBLIGATORY,&lt;/P&gt;&lt;P&gt;                 s_bukrs FOR ekko-bukrs OBLIGATORY.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i enter EBELN in selection screen, bedat shoulnot be mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if EBELN field is blank BEDAT should be mandatory.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to do tat,please help me out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Suprith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Aug 2008 10:44:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-19T10:44:30Z</dc:date>
    <item>
      <title>selection-screen validation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326546#M1030902</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;this my selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH  FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : s_ebeln FOR ekko-ebeln,&lt;/P&gt;&lt;P&gt;                 s_lifnr FOR ekko-lifnr,&lt;/P&gt;&lt;P&gt;                 s_bedat FOR ekko-bedat OBLIGATORY,&lt;/P&gt;&lt;P&gt;                 s_bukrs FOR ekko-bukrs OBLIGATORY.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i enter EBELN in selection screen, bedat shoulnot be mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if EBELN field is blank BEDAT should be mandatory.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to do tat,please help me out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Suprith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 10:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326546#M1030902</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T10:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen validation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326547#M1030903</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;Suprith has written-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_ebeln FOR ekko-ebeln,
s_lifnr FOR ekko-lifnr,
s_bedat FOR ekko-bedat OBLIGATORY,
s_bukrs FOR ekko-bukrs OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.

if i enter EBELN in selection screen, bedat shoulnot be mandatory.


if EBELN field is blank BEDAT should be mandatory.. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this way-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you put OBLIGATORY then Validation will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_ebeln FOR ekko-ebeln,
s_lifnr FOR ekko-lifnr,
s_bedat FOR ekko-bedat,
s_bukrs FOR ekko-bukrs .
SELECTION-SCREEN END OF BLOCK b1.



AT SELECTION-SCREEN.

if  S_EBELN[]  is Initial and s_bedat in not Initial.
  Message 'Bedat field should not be blank' type 'E'.
Endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sujit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 10:49:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326547#M1030903</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T10:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen validation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326548#M1030904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Surpeet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best option is to make the fields non-mandatory first...&lt;/P&gt;&lt;P&gt;First let the user execute with data on the selection screen and then check it through coding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once we have the user entering the data and executing &lt;/P&gt;&lt;P&gt;if ebeln is initial.&lt;/P&gt;&lt;P&gt;if bedat is initial.&lt;/P&gt;&lt;P&gt;message 'please enter either bedat or ebeln' type 'I'.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;in this case if user enters either one of the fields message wont come and you have the intended result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls check this,it will work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 10:52:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326548#M1030904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T10:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen validation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326549#M1030905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TABLES:   SSCRFIELDS.   " Fields on selection screens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form to Validate data specified on Selection Screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CHECK SSCRFIELDS-UCOMM EQ 'ONLI'.&lt;/P&gt;&lt;P&gt;  PERFORM SELECTIONSCREEN_VALIDATIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this perform check whether EBELN is passed, then check whether BEDAT is passed or empty and don't trigger any message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if EBELN is not passed check whether BEDAT has a value and if there exists no value, trigger a message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form looks as below...&lt;/P&gt;&lt;P&gt;FORM SELECTIONSCREEN_VALIDATIONS .&lt;/P&gt;&lt;P&gt;  IF P_PCUPLD = C_PC_SELECTED.&lt;/P&gt;&lt;P&gt;    IF SY-BATCH EQ C_PC_SELECTED.&lt;/P&gt;&lt;P&gt;      CLEAR SSCRFIELDS-UCOMM.&lt;/P&gt;&lt;P&gt;      MESSAGE E001(ZZ) WITH TEXT-014.&lt;/P&gt;&lt;P&gt;      " File cannot  be upload from presentation server when execute in&lt;/P&gt;&lt;P&gt;      " Batch Mode.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " SELECTIONSCREEN_VALIDATIONS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 10:52:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326549#M1030905</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T10:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen validation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326550#M1030906</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;try this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At selection-screen output.&lt;/P&gt;&lt;P&gt;if s_ebeln[] is initial.&lt;/P&gt;&lt;P&gt;loop at screen.&lt;/P&gt;&lt;P&gt;if screen-name = 'S_BEDAT-LOW'.&lt;/P&gt;&lt;P&gt;screen-REQUIRED = 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify screen.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;loop at screen.&lt;/P&gt;&lt;P&gt;if screen-name = 'S_BEDAT-LOW'.&lt;/P&gt;&lt;P&gt;screen-REQUIRED = 0.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify screen.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 11:08:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326550#M1030906</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T11:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen validation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326551#M1030907</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;Check the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: ekko.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : s_ebeln FOR ekko-ebeln,&lt;/P&gt;&lt;P&gt;s_lifnr FOR ekko-lifnr,&lt;/P&gt;&lt;P&gt;s_bedat FOR ekko-bedat, "OBLIGATORY,&lt;/P&gt;&lt;P&gt;s_bukrs FOR ekko-bukrs OBLIGATORY.&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.&lt;/P&gt;&lt;P&gt;  if s_ebeln is initial and s_bedat is initial.&lt;/P&gt;&lt;P&gt;      message i000(0) with 'You must enter value in Bedat field'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 11:14:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326551#M1030907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T11:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen validation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326552#M1030908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;if u put OBLIGATORY here, then u can not get what u want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think u could code like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : s_ebeln FOR ekko-ebeln,&lt;/P&gt;&lt;P&gt;s_lifnr FOR ekko-lifnr,&lt;/P&gt;&lt;P&gt;s_bedat FOR ekko-bedat ,&lt;/P&gt;&lt;P&gt;s_bukrs FOR ekko-bukrs .&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the "at selection-screen" event,   check the input (notice that this is not the abap code):&lt;/P&gt;&lt;P&gt; if (EBELN is empty and BEDAT is empty) &lt;/P&gt;&lt;P&gt;        here goes the logic&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 11:15:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326552#M1030908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T11:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen validation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326553#M1030909</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;&lt;STRONG&gt;you need to use Loop at screen  and make the fields required based on the condition you require.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;at selection-screen output.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;loop at screen.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;screen-required = '0' .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;     &lt;STRONG&gt;case screen-name.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;       &lt;STRONG&gt;when 's_bedat'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;if s_ebeln is initial.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;screen-required = '1'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;endcase.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also please check the following link by RIch Heilman.&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=15318538&amp;amp;messageID=1706668" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=15318538&amp;amp;messageID=1706668&lt;/A&gt;&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;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 11:23:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-validation/m-p/4326553#M1030909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T11:23:14Z</dc:date>
    </item>
  </channel>
</rss>

