<?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: validations in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2302981#M503517</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;You can use the event AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this ex..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

PARAMETERS: P_MATNR TYPE MATNR,
                        P_WERKS TYPE WERKS_D.

AT SELECTION-SCREEN.

* If both the parameters are entered raise an error message.
IF NOT P_MATNR IS INITIAL AND
   NOT P_WERKS IS INITIAL.
  MESSAGE E208(00) WITH 'You cannot enter both of them'.
ENDIF.

* One of them should be mandatory.
IF P_MATNR  IS INITIAL AND
    P_WERKS IS INITIAL.
  MESSAGE E208(00) WITH 'Enter one of them'.
ENDIF.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2007 22:02:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-15T22:02:19Z</dc:date>
    <item>
      <title>validations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2302979#M503515</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;I have added two optional parameters in the selection screen of an existing program.now the requirement is..user has to enter in any one of the parameters but not both,or none of them.&lt;/P&gt;&lt;P&gt;how to write the logic for this and where to write..(which event).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points assured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards,&lt;/P&gt;&lt;P&gt;maahi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 21:21:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2302979#M503515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T21:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: validations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2302980#M503516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to write the code under at selection-screen or even you can write under start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_1 is 'X' &lt;/P&gt;&lt;P&gt;if p_2 is 'X'.&lt;/P&gt;&lt;P&gt;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;Reward points if it is helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 21:23:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2302980#M503516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T21:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: validations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2302981#M503517</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;You can use the event AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this ex..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

PARAMETERS: P_MATNR TYPE MATNR,
                        P_WERKS TYPE WERKS_D.

AT SELECTION-SCREEN.

* If both the parameters are entered raise an error message.
IF NOT P_MATNR IS INITIAL AND
   NOT P_WERKS IS INITIAL.
  MESSAGE E208(00) WITH 'You cannot enter both of them'.
ENDIF.

* One of them should be mandatory.
IF P_MATNR  IS INITIAL AND
    P_WERKS IS INITIAL.
  MESSAGE E208(00) WITH 'Enter one of them'.
ENDIF.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 22:02:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2302981#M503517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T22:02:19Z</dc:date>
    </item>
  </channel>
</rss>

