<?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 mandatory to optional in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193962#M761011</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all ABAP Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field that is declared as mandatory and I cant change it to optional.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is mandatory for a flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the field should be optional when I enter the flag as 'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Dec 2007 15:10:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-21T15:10:06Z</dc:date>
    <item>
      <title>mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193962#M761011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all ABAP Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field that is declared as mandatory and I cant change it to optional.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is mandatory for a flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the field should be optional when I enter the flag as 'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 15:10:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193962#M761011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T15:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193963#M761012</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;Its a dialog programming or selection screen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 15:12:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193963#M761012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T15:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193964#M761013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is a selection-screen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 15:49:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193964#M761013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T15:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193965#M761014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check in the &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u will find some there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 15:51:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193965#M761014</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2007-12-21T15:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193966#M761015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess the only way to do this is by writing a validation in the event &lt;/P&gt;&lt;P&gt;AT SELECTION SCREEN on Checkbox.&lt;/P&gt;&lt;P&gt;If checkbox = 'X'.&lt;/P&gt;&lt;P&gt;   if Field is initial.&lt;/P&gt;&lt;P&gt;      throw an error message.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 15:52:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193966#M761015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T15:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193967#M761016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot switch from mandatory to optional in a selection screen using AT SELECTION-SCREEN OUTPUT event. You will have to check that yourself in the AT SELECTION-SCREEN event. Check if that field is entered (or not entered) when a certain condition is met and do not allow the user to proceed any further. To achieve this you will have to declare SSCRFIELDS in your TABLES statement and then in your AT SELECTION-SCREEN event do the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE SSCRFIELDS-UCOMM.&lt;/P&gt;&lt;P&gt;  WHEN 'ONLI' OR 'PRIN' OR 'SJOB'.&lt;/P&gt;&lt;P&gt;    CLEAR SSCRFIELDS-UCOMM.&lt;/P&gt;&lt;P&gt;    IF flag = 'X' AND field IS INITIAL.&lt;/P&gt;&lt;P&gt;      MESSAGE E001(00) WITH 'Value for field is required when flag = x'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  WHEN OTHERS.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 15:57:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193967#M761016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T15:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193968#M761017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;flag is not a checkbox, it is a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried with the &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this doesnt change the field as it still is mandatory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 15:58:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193968#M761017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T15:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193969#M761018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do not declare field as mandatory and check as I suggested before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 15:59:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193969#M761018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T15:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193970#M761019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there is no change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It still says "Make an entry in all required fields".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 16:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193970#M761019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T16:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193971#M761020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cant change it from mandatory to optional&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 16:05:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193971#M761020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T16:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193972#M761021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramana, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont think there is a direct way of making that field not mandatory.&lt;/P&gt;&lt;P&gt;I have a work around for this.&lt;/P&gt;&lt;P&gt;In event AT SELECTION SCREEN on &amp;lt;Flag&amp;gt;&lt;/P&gt;&lt;P&gt;Enter some junk/default value into FieldA "which you want to not mandatory.&lt;/P&gt;&lt;P&gt;Also make the field disabled, by looping at screen and set invisible parameter = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Event Start of Selection.&lt;/P&gt;&lt;P&gt;In the very first statement check the Flag = 'X'  and FieldA = default value, clear the fieldA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Lokesh Aggarwal on Dec 21, 2007 4:12 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 16:11:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193972#M761021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T16:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193973#M761022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is your program, why can't you declare this parameter as optional and check for mandatory entry upon the condition being satisfied?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 16:15:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193973#M761022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T16:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193974#M761023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its not my program, I cant change the existing code.&lt;/P&gt;&lt;P&gt;the mandatory field is in the existing code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I can add to it. &lt;/P&gt;&lt;P&gt;I have to write for the flag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 16:24:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193974#M761023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T16:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193975#M761024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still get the same message&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 16:24:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193975#M761024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T16:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: mandatory to optional</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193976#M761025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no way you can do that without making it optional parameter. The runtime environment does the necessary checks for mandatory entries before even it gives control to you. So unless you remove the mandatory requirement, you will not be able to control its behaviour. Just curious, if it is a custom program, why is it that you cannot make it optional? If there is a genuine requirement to make mandatory only if the flag is 'X', then it is also implicitly understood that you will make changes that are needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 16:32:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mandatory-to-optional/m-p/3193976#M761025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T16:32:29Z</dc:date>
    </item>
  </channel>
</rss>

