<?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: Error Message For Correct Input. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192478#M1201638</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jus copy paste this . It works perfectly .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF P_BUKRS IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;SELECT SINGLE BUKRS&lt;/P&gt;&lt;P&gt;FROM T001&lt;/P&gt;&lt;P&gt;INTO P_BUKRS&lt;/P&gt;&lt;P&gt;WHERE BUKRS = P_BUKRS&lt;/P&gt;&lt;P&gt;AND ( BUKRS = 'HK01' or BUKRS = 'HU01' or BUKRS = 'ID01' or BUKRS = 'IE01').&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE e000 WITH text-t07.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 21 Feb 2009 06:01:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-21T06:01:44Z</dc:date>
    <item>
      <title>Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192459#M1201619</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;Im generating Vendor Report I want to Dispaly the Error Message for Invalid Input.&lt;/P&gt;&lt;P&gt;If i give the Company Codes other than 1000,2000,3000, &amp;amp; 4000 it should give the Error&lt;/P&gt;&lt;P&gt;as Invalid Company code...But For Correct company code also it is giving Error...&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;I Created Error class 'YVENMSG'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in my Program i called Erorr as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc IS  INITIAL.&lt;/P&gt;&lt;P&gt;MESSAGE e000(YVENMSG) .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont know wr im wrong...&lt;/P&gt;&lt;P&gt;Plz help me on this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Smitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 04:31:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192459#M1201619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T04:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192460#M1201620</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;If you give sy-subrc as initial it will throw error when sy-subrc is 0.(success)&lt;/P&gt;&lt;P&gt;So change it as if sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;This should work &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 04:35:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192460#M1201620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T04:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192461#M1201621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;if co NE '1000' and co NE '2000' and co ne '3000'. " co is compnay code
  MESSAGE 'wrong' type 'I'." Here give ur own message
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 04:39:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192461#M1201621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T04:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192462#M1201622</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;I tried this it wil give the error as no vendor specified then it displays Invalid Comapny code...&lt;/P&gt;&lt;P&gt;Any one error it should display....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 04:51:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192462#M1201622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T04:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192463#M1201623</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;I tried as sy-subrc ne 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;again im facing same Problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 04:51:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192463#M1201623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T04:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192464#M1201624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please check the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztn_test.
PARAMETERS: co type i.

AT SELECTION-SCREEN.
if co NE '1000' and co NE '2000' and co ne '3000' and co ne '4000'.
  MESSAGE 'wrong' type 'I'.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 04:57:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192464#M1201624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T04:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192465#M1201625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Smitha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You declare as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- SELECTION-SCREEN&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : s_werks FOR vbap-werks .                 "Plant&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Selection Screen validation&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN .&lt;/P&gt;&lt;P&gt;  IF s_werks-low IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE werks            "Plant&lt;/P&gt;&lt;P&gt;    FROM t001w&lt;/P&gt;&lt;P&gt;    INTO s_werks-low&lt;/P&gt;&lt;P&gt;    WHERE werks = s_werks-low&lt;/P&gt;&lt;P&gt;    and werks in ( '2000','3000','4000' ).&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;      MESSAGE e000 WITH text-t48.&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;if its a parameter just replace s_werks as p_werks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Martina Floriette on Feb 21, 2009 6:01 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:01:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192465#M1201625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192466#M1201626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : s_werks FOR vbap-werks  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;*Selection Screen validation&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE werks FROM t001w&lt;/P&gt;&lt;P&gt;INTO s_werks-low&lt;/P&gt;&lt;P&gt;WHERE werks = s_werks-low&lt;/P&gt;&lt;P&gt;and werks in ( '1000','2000','3000','4000' ).&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE e000(ZXXX).&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:11:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192466#M1201626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192467#M1201627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My query Resolved....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:19:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192467#M1201627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192468#M1201628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if ur referring Z-table give check table to that field then it will check automatically &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;other wise &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selections scren write select single for t001w table &lt;/P&gt;&lt;P&gt;iten if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;then give error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:22:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192468#M1201628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192469#M1201629</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;Im facing one more Problem,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 1000 Company code it is giving Correct OutPut...&lt;/P&gt;&lt;P&gt;But for 2000,3000,4000 comapny code When i execute first it gives the Message as &lt;/P&gt;&lt;P&gt;'No VENDOR Specified' Then it Gives the correct Out Put...&lt;/P&gt;&lt;P&gt;How to Resolve This?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:34:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192469#M1201629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192470#M1201630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Error Message what logic u are using now?&lt;/P&gt;&lt;P&gt;if u have used OR operaot in it then replace it with AND.&lt;/P&gt;&lt;P&gt;Are u giving Company Code through PARAMETER?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:36:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192470#M1201630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192471#M1201631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF P_BUKRS IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT SINGLE BUKRS&lt;/P&gt;&lt;P&gt;    FROM LFB1&lt;/P&gt;&lt;P&gt;    INTO P_BUKRS&lt;/P&gt;&lt;P&gt;    WHERE BUKRS = P_BUKRS.&lt;/P&gt;&lt;P&gt;    AND BUKRS IN ('1000','2000','3000','4000').&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;      MESSAGE E000(YVENMSG).&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;This is my code...&lt;/P&gt;&lt;P&gt;Im using the Parameter only....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:41:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192471#M1201631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192472#M1201632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:41:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192472#M1201632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192473#M1201633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if u want vendor to be inputted always,then provide OBLIGATORY to the select-options as given in my code above..then ur problem will be resolved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; or if u dont want to provide dat...do like dis...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF P_BUKRS IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT SINGLE BUKRS&lt;/P&gt;&lt;P&gt;    FROM &lt;STRONG&gt;T001&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    INTO P_BUKRS&lt;/P&gt;&lt;P&gt;    WHERE BUKRS = P_BUKRS&lt;/P&gt;&lt;P&gt;    AND BUKRS IN ('1000','2000','3000','4000').&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;      MESSAGE E000(YVENMSG).&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt; MESSAGE E001(YVENMSG).             "No company code specified&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: TT on Feb 21, 2009 11:15 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:42:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192473#M1201633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192474#M1201634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have Declared as Obligatory Only....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:47:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192474#M1201634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192475#M1201635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;tables: vbap.
SELECTION-SCREEN BEGIN OF BLOCK b1.
SELECT-OPTIONS : s_werks FOR vbap-werks OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
data: BEGIN OF itab OCCURS 10,
      burks like lfb1-bukrs,
     end of itab.

*Selection Screen validation
AT SELECTION-SCREEN .

if s_werks-low NE '1000' and s_werks-low NE '2000' and s_werks-low ne '3000' and s_werks-low ne '4000'.
  MESSAGE 'wrong' type 'I'. " Here use ur own message class to display error
else.
  SELECT SINGLE BUKRS
FROM LFB1
INTO itab
WHERE BUKRS = s_werks
AND BUKRS = s_werks-low." Only given compnay code in select option data will be selected. "('1000','2000','3000','4000').
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:53:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192475#M1201635</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192476#M1201636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;tables: vbap.
SELECTION-SCREEN BEGIN OF BLOCK b1.
SELECT-OPTIONS : s_werks FOR vbap-werks OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
data: BEGIN OF itab OCCURS 10,
      burks like lfb1-bukrs,
     end of itab.

*Selection Screen validation
AT SELECTION-SCREEN .

if s_werks-low NE '1000' and s_werks-low NE '2000' and s_werks-low ne '3000' and s_werks-low ne '4000'.
  MESSAGE 'wrong' type 'I'.
else.
  SELECT SINGLE BUKRS
FROM LFB1
INTO itab
WHERE BUKRS = s_werks
AND BUKRS = s_werks-low." Only given compnay code in select option data will be selected. "('1000','2000','3000','4000').
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:53:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192476#M1201636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192477#M1201637</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;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT golt it Resolved....&lt;/P&gt;&lt;P&gt;i forgot to delete the Error Message which is declared in Text Elements...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 05:56:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192477#M1201637</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T05:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message For Correct Input.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192478#M1201638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jus copy paste this . It works perfectly .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF P_BUKRS IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;SELECT SINGLE BUKRS&lt;/P&gt;&lt;P&gt;FROM T001&lt;/P&gt;&lt;P&gt;INTO P_BUKRS&lt;/P&gt;&lt;P&gt;WHERE BUKRS = P_BUKRS&lt;/P&gt;&lt;P&gt;AND ( BUKRS = 'HK01' or BUKRS = 'HU01' or BUKRS = 'ID01' or BUKRS = 'IE01').&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE e000 WITH text-t07.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2009 06:01:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-for-correct-input/m-p/5192478#M1201638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-21T06:01:44Z</dc:date>
    </item>
  </channel>
</rss>

