<?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 Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780177#M336286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the PAI of that screen you write this logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case OK_CODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'SAVE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if field1 eq NULL OR field2 eq NULL OR field3 EQ NULL or field4 EQ Null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write e101. " Enter all fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;save the data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Guru&lt;/P&gt;&lt;P&gt;Reward points for helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Dec 2006 05:07:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-11T05:07:15Z</dc:date>
    <item>
      <title>Validation Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780175#M336284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been working on an assignment in which has got 4 or 5 text input fields on a screen. I have to write a validation so that unless the user inputs a value in all these fields his entry should not get saved and  he should receive a message to input values in all the fields..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to go about it..??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alok.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 05:03:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780175#M336284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T05:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Validation Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780176#M336285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make the fields mandatory using the obligatory key word&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter : P_VBELN type VBAK-VBELN obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;- Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 05:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780176#M336285</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2006-12-11T05:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Validation Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780177#M336286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the PAI of that screen you write this logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case OK_CODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'SAVE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if field1 eq NULL OR field2 eq NULL OR field3 EQ NULL or field4 EQ Null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write e101. " Enter all fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;save the data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Guru&lt;/P&gt;&lt;P&gt;Reward points for helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 05:07:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780177#M336286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T05:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Validation Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780178#M336287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Alok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can simply do that by declaring the variables in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;parameters: p_fld1(10) type c obligatory,
            p_fld2(10) type c obligatory,
            p_fld3(10) type c obligatory.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you are not using &amp;lt;b&amp;gt;OBLIGATORY&amp;lt;/b&amp;gt;, we can achieve the same by below validation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;at selection-screen.
   if p_fld1 is initial or
      p_fld2 is initial or
      p_fld3 is initial.
      message e000(01) with 'Please input values for all paramters:'.
   endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just incase, you are using Module Pool Program&lt;/P&gt;&lt;P&gt;Change the attributes of the field, to make it mandatory:&lt;/P&gt;&lt;P&gt;Proceed as below:&lt;/P&gt;&lt;P&gt;1. SE51&lt;/P&gt;&lt;P&gt;2. Change the layout editor&lt;/P&gt;&lt;P&gt;3. Double click on field to make mandatory.&lt;/P&gt;&lt;P&gt;4. In the window that is opened: Select Program from Attributes tab.&lt;/P&gt;&lt;P&gt;5. In the Input Dropdown list, select option required to make it mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Eswar Rao Boddeti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 05:08:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780178#M336287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T05:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Validation Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780179#M336288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As the validation is on all the fields.&lt;/P&gt;&lt;P&gt;writing the obligatory will give message for evry field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write in the following way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt; CHAIN.&lt;/P&gt;&lt;P&gt;    FIELD field1.&lt;/P&gt;&lt;P&gt;    FIELD field2.&lt;/P&gt;&lt;P&gt;    MODULE SET_validation ON CHAIN-REQUEST.&lt;/P&gt;&lt;P&gt;ENDCHAIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE set_validation.&lt;/P&gt;&lt;P&gt;if field1 is not initial and fields2 not initial.&lt;/P&gt;&lt;P&gt;message e001 with 'provide input in all the fields.'&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 05:20:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780179#M336288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T05:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Validation Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780180#M336289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, &lt;/P&gt;&lt;P&gt;try using Filed statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Checking Single Fields&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you send a warning or error message from a module mod  that you called using a FIELDstatement as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;FIELD f MODULE mod.&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the corresponding input field on the current screen is made ready for input again, allowing the user to enter a new value. If the field is only checked once, the PAI processing continues directly after the FIELDstatement, and the preceding modules are not called again.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Checking a Set of Fields&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a warning or an error message is sent in a module mod1 mod2 &amp;#133; that you called within a processing chain:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHAIN.&lt;/P&gt;&lt;P&gt;  FIELD: f1, f2,...&lt;/P&gt;&lt;P&gt;  MODULE mod1.&lt;/P&gt;&lt;P&gt;  FIELD: g1, g2,...&lt;/P&gt;&lt;P&gt;  MODULE mod2.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDCHAIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all of the input fields on the current screen that belong to the processing chain are made ready for input again &amp;#150; including those that are in FIELD statements after the MODULEstatement. All the other fields are not ready for input.  Even if a MODULE statement appears within a processing chain, combined with a FIELD statement, all of the input fields in the chain are made ready for input again &amp;#150; not just the field in question. The user can repeat the input. If the fields in the processing chain are only checked once, the PAI processing continues directly after the automatic checks at the CHAINstatement, and the preceding modules are not called again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for more details check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbaa4735c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbaa4735c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 05:29:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780180#M336289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T05:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Validation Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780181#M336290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot to all of you. I regret that I cann't reward points to all the replies..a limitation of SDN..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Writing If..Endif..and displaying the message worked but the screen remains grey..not ready to accept another entry. My requirement is that as soon as the I display the error message..after pressing the enter key the screen should be ready to accept another entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alok.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 05:50:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780181#M336290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T05:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Validation Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780182#M336291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To make ready for input as soon as entered pressed do the following:-&lt;/P&gt;&lt;P&gt;instead opf using error, use warning followed by STOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*At selection-screen&lt;/P&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt;  perform form_check_restrictions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM form_check_restrictions .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*If the Selection Crieteria not specified&lt;/P&gt;&lt;P&gt;  IF S_BUDAT[] is initial AND&lt;/P&gt;&lt;P&gt;     S_BWART[] is initial AND&lt;/P&gt;&lt;P&gt;     S_CHARG[] is initial AND&lt;/P&gt;&lt;P&gt;     S_KUNNR[] is initial AND&lt;/P&gt;&lt;P&gt;     S_LGORT[] is initial AND&lt;/P&gt;&lt;P&gt;     S_LIFNR[] is initial AND&lt;/P&gt;&lt;P&gt;     S_MATNR[] is initial AND&lt;/P&gt;&lt;P&gt;     s_extb[]  is initial AND&lt;/P&gt;&lt;P&gt;     s_misc[]  is initial AND&lt;/P&gt;&lt;P&gt;     S_SOBKZ[] is initial AND&lt;/P&gt;&lt;P&gt;     S_USNAM[] is initial AND&lt;/P&gt;&lt;P&gt;     S_VGART[] is initial AND&lt;/P&gt;&lt;P&gt;     S_WERKS[] is initial AND&lt;/P&gt;&lt;P&gt;     S_XBLNR[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MESSAGE 'Selection was not restricted.' TYPE 'W'.&lt;/P&gt;&lt;P&gt;   STOP.&lt;/P&gt;&lt;P&gt;&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;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 06:17:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780182#M336291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T06:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Validation Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780183#M336292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;try chain fields statement. it will not allow u untill 2 completly fill all fields.&lt;/P&gt;&lt;P&gt;i will even check data type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 06:22:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-issue/m-p/1780183#M336292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T06:22:55Z</dc:date>
    </item>
  </channel>
</rss>

