<?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>Question Re: Catch validation errors in ABAP in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866706#M2814486</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What kind of pop up you are showing.&lt;/P&gt;&lt;P&gt;wt kind of window is it .&lt;/P&gt;&lt;P&gt;is it a confirmation window or you have created a new window.&lt;/P&gt;&lt;P&gt;and how r you passing the error messg to pop up window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried to generate the same kind of scenario ..&lt;/P&gt;&lt;P&gt;but for me it is not navigating to the pop up window &lt;/P&gt;&lt;P&gt;it is not going anywhere. because as per the webdynpro phase model .&lt;/P&gt;&lt;P&gt;validation of these standard types happens in the second step itself before any other thing.&lt;/P&gt;&lt;P&gt;so it is coming for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to suppress that error of standard validation.&lt;/P&gt;&lt;P&gt;you dont want it to come. it can be achieved by making the action validation- independent.&lt;/P&gt;&lt;P&gt;in that case that error itself wont come.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the action list just select that messg and make it validation independent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;sarbjeet singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 May 2011 09:55:20 GMT</pubDate>
    <dc:creator>gill367</dc:creator>
    <dc:date>2011-05-23T09:55:20Z</dc:date>
    <item>
      <title>Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaq-p/7866693</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;Description:&lt;/STRONG&gt; When we enter data other then what is defined for a UI element, we get an error and are not allowed to proceed ahead till we correct it. &lt;/P&gt;&lt;P&gt;e.g.  When we define a context attribute as type Date and suppose enter alphabets we get an error message u201CXYS is not a date format u201C. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my requirement I have a time field. When time is less than 3 hours 30 mis I display a popup with input field. This popup window has OK and Cancel Button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when I enter a wrong time format say 03:2:00 instead of 03:20:00 .Popup window comes and displays a error message time format invalid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt; The problem is user is not allowed to go back to main screen because of error.&lt;/P&gt;&lt;P&gt;OK and cancel button are not working. I think the reason is these standard error messages had cancel navigation as TRUE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the problem at all places when popup comes and user has enters a wrong data in the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide how to avoid same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhvika&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Madhvika Joshi on May 23, 2011 1:15 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 05:14:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaq-p/7866693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T05:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866694#M2814474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhvika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Popup view is Modal view, so without closing model veiw you can't access main veiw. I Think this is the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 05:44:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866694#M2814474</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T05:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866695#M2814475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi madhavika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  In your example , if you set the date field as mandatory field( requried property ) then you cannot go back.&lt;/P&gt;&lt;P&gt;If you set the above parameter, then uncheck that parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And let me know your scenario, so that we can approach in better way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 06:05:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866695#M2814475</guid>
      <dc:creator>former_member199125</dc:creator>
      <dc:date>2011-05-23T06:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866696#M2814476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kris ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. &lt;/P&gt;&lt;P&gt;Can youi please guide on solution .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 06:15:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866696#M2814476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T06:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866697#M2814477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am performing Validation like if total travel time is less than 3 hours 30 mins and user has selected business class, I have to display a popup with input field where user enters reason for deviation in policy. This popup has ok and cancel button. Ok button only works when user has entered reason. If user doesnu2019t want to enter reason he can click cancel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total travel time field is a time field with format HH:MM: SS. If user enter wrong format like 03:2:00 and then click on business class radio button, in wdbefore action method where I have written validation code is executed . As desired popup comes but with an error that time format is invalid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And user is stuck to that window as OK and Cancel button are not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question: How can I stop displaying the popup when user has entered invalid time?  &lt;/P&gt;&lt;P&gt;Or to catch this validation which is performed by SAP internally.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 06:25:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866697#M2814477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T06:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866698#M2814478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhvika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As i am right, You are entering time in main view and displaying error message in popup window,&lt;/P&gt;&lt;P&gt;dont display in popup, display error message in main veiw if time goes wrong, if time is correct then only go to popup view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 06:26:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866698#M2814478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T06:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866699#M2814479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the check for Time if its a valid format or not is performed by SAP . I have not written that code. &lt;/P&gt;&lt;P&gt;My problem wud be solved if i can catch this error before displaying the popup. Like if time entered in not valid then exit dont proceed with the next code to display popup .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 06:44:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866699#M2814479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T06:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866700#M2814480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Madhvika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  You say in one of your posts that you perform the validation in WDDOBEFOREACTION action and raise the pop-up and now you want to skip that part?&lt;/P&gt;&lt;P&gt;Please let us know, what validation you are doing in WDDOBEFOREACTION action?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What validation are you trying to block?..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 06:59:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866700#M2814480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T06:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866701#M2814481</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;Use Message are in your veiw not popup, and check your date format and write your own code,&lt;/P&gt;&lt;P&gt;if condition not satisfy, display error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 07:01:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866701#M2814481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T07:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866702#M2814482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry cudnt understand your message . Can you please help again .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhvika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 08:45:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866702#M2814482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T08:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866703#M2814483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aditya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Popup comes when there is a validation failure that total time is less than 3 hours 30 mins and travel class selected as Business. On any first action code in wdbeforeaction is executed and popup is displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now problem is user has entered wrong time format and selected business class. Check for entered data if itu2019s valid or not is done by SAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both action display of popup and sap check for invalid data happens at the same tine and thus error message is displayed on popup window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So no navigation is possible with ok and cancel button that is the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope itu2019s clear now &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhvika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 09:32:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866703#M2814483</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T09:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866704#M2814484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madvika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am saying that, create your own code to validate your dates, and in condition display your message.&lt;/P&gt;&lt;P&gt;If condition true then only display popup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 09:46:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866704#M2814484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T09:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866705#M2814485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Madhvika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Can you please post the validation code and pop-up raising code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to replicate a similar sceanrio and it works fine for me..&lt;/P&gt;&lt;P&gt;When the time is in wrong format, SAP error comes in the original view and on top of that pop-up comes,and 'OK' and 'Cancel'&lt;/P&gt;&lt;P&gt;seem to work fine...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 09:55:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866705#M2814485</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T09:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866706#M2814486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What kind of pop up you are showing.&lt;/P&gt;&lt;P&gt;wt kind of window is it .&lt;/P&gt;&lt;P&gt;is it a confirmation window or you have created a new window.&lt;/P&gt;&lt;P&gt;and how r you passing the error messg to pop up window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried to generate the same kind of scenario ..&lt;/P&gt;&lt;P&gt;but for me it is not navigating to the pop up window &lt;/P&gt;&lt;P&gt;it is not going anywhere. because as per the webdynpro phase model .&lt;/P&gt;&lt;P&gt;validation of these standard types happens in the second step itself before any other thing.&lt;/P&gt;&lt;P&gt;so it is coming for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to suppress that error of standard validation.&lt;/P&gt;&lt;P&gt;you dont want it to come. it can be achieved by making the action validation- independent.&lt;/P&gt;&lt;P&gt;in that case that error itself wont come.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the action list just select that messg and make it validation independent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;sarbjeet singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 09:55:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866706#M2814486</guid>
      <dc:creator>gill367</dc:creator>
      <dc:date>2011-05-23T09:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866707#M2814487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhvika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if i got the requirement properly, however if you want to catch validation errors generated data type checks for example date and time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you can do that by using interface if_wd_validation, this interface has methods like set_attribute_valid which suppresses those messages and then you can raise your own messages!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 11:06:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866707#M2814487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T11:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866708#M2814488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhvika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your problem is that you can't change SAP code, right? Why don't you write an Overwrite Exit for the standard SAP Method . You can copy the complete code and of SAP and modify the check accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vineet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 11:16:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866708#M2814488</guid>
      <dc:creator>vineetrrakesh</dc:creator>
      <dc:date>2011-05-23T11:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866709#M2814489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to mention again that problem is not only for time field but with all any fields. If data entered by user is not in correct format or not valid SAP validation error comes in my popup or any validation messages that I have done also comes in popup .Reason being my code to open a popup is written in wdbeforeaction method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the complete details with code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Front Screen:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;There is a table with Flight details In that there are user can select business class, first class, economy class via a radio button option. There is a column where user enters total travel duration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CODE:&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;In Wdbeforeaction this is the code for policy deviation check &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Policy Deviation Check For Flight Travel Class, if total travel duration is less than 3:30 Hours and employee has selected Business class or first class a popup window should be displayed to capture the deviation reason 

        IF lwa_flight_info-cabin EQ 'B' OR  lwa_flight_info-cabin EQ 'F' .
          IF lwa_flight_info-yym_trav_time &amp;lt;= '033000'  .


              wd_this-&amp;gt;open_popup( EXPORTING lv_type = 'F' ).

              EXIT.

          ENDIF
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In view this is the method for opening popup window.This is called from wdbeforeaction &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code for popup window&lt;/STRONG&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lo_view_controller type ref to if_wd_view_controller.
DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component  TYPE REF TO if_wd_component.
DATA lo_window         TYPE REF TO if_wd_window.

lo_api_component  = wd_comp_controller-&amp;gt;wd_get_api( ).
lo_window_manager = lo_api_component-&amp;gt;get_window_manager( ).
lo_window         = lo_window_manager-&amp;gt;create_window(
                   window_name            = 'POPUP_WINDOW'
*                  title                  =
                   close_in_any_case      = abap_false
*                  message_display_mode   = if_wd_window=&amp;gt;CO_MSG_DISPLAY_MODE_ALL
                   close_button           = abap_false
                   button_kind            = if_wd_window=&amp;gt;co_buttons_okcancel
*                  message_type           = if_wd_window=&amp;gt;co_msg_type_warning
                   default_button         = if_wd_window=&amp;gt;co_button_ok
                   ).

  DATA lo_nd_popup TYPE REF TO if_wd_context_node.
  DATA lo_el_popup TYPE REF TO if_wd_context_element.
  DATA ls_popup TYPE wd_this-&amp;gt;element_popup.
  DATA lv_popup_win LIKE ls_popup-popup_win.
* navigate from &amp;lt;CONTEXT&amp;gt; to &amp;lt;POPUP&amp;gt; via lead selection
  lo_nd_popup = wd_context-&amp;gt;get_child_node( name = wd_this-&amp;gt;wdctx_popup ).

* get element via lead selection
  lo_el_popup = lo_nd_popup-&amp;gt;get_element(  ).

lv_popup_win = lo_window.

* get single attribute
  lo_el_popup-&amp;gt;set_attribute(
    EXPORTING
      name =  `POPUP_WIN`
      value = lv_popup_win ).

lo_view_controller = wd_this-&amp;gt;wd_get_api( ).


	lo_window-&amp;gt;subscribe_to_button_event(
	button = if_wd_window=&amp;gt;co_button_ok
	button_text = 'OK'
	action_name = 'OK'
	action_view = lo_view_controller ).

      lo_window-&amp;gt;subscribe_to_button_event(
	button = if_wd_window=&amp;gt;co_button_cancel
	button_text = 'Cancel'
	action_name = 'CANCEL'
	action_view = lo_view_controller ).





lo_window-&amp;gt;open( ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 03:50:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866709#M2814489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-24T03:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866710#M2814490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think problem is because of code in wdbeforeaction. why don't write your code in on_select event of table or dropdown(if you are using ), i think you are selecting first or business class, so i am suggesting this. Try this it might helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 04:13:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866710#M2814490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-24T04:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866711#M2814491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think SAP validations are checked after wdbeforeaction  so i am writting code in afteraction method . i think that should solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will update post once done .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for all ur valuable time. Rewarding points for same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhvika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 05:26:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866711#M2814491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-24T05:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Catch validation errors in ABAP</title>
      <link>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866712#M2814492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhvika&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for holding you little longer on the issue but Just wanted to check whether are you going to change the standard code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would  like to suggest you to do not change SAP standard code, You should write custom coding in any Enhancement Implementation, You can write Exit methods to hadle your issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why earlier I suggested you to write an Overwrite Exit of the same method where the po-up is thrown and you want to stop the Pop-up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case if any upgrade haapens and SAP gives you some code in AfterAction method your changes will be overwritten again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best way to get the changes done in SAP coding is from SAP only, and you should create a ticket to SAP so that they fix it. In that case they will take care of the fixes while providing higher versions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vineet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 05:45:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/catch-validation-errors-in-abap/qaa-p/7866712#M2814492</guid>
      <dc:creator>vineetrrakesh</dc:creator>
      <dc:date>2011-05-24T05:45:14Z</dc:date>
    </item>
  </channel>
</rss>

