Skip to Content
author's profile photo Former Member
Former Member

Urgent - How to stop navigation after the first message

hi,

Can anyone tell me how to stop the navigation or furthur processing once the first error message is fired.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 26, 2007 at 11:38 AM

    Hi,

    You can also use simpe IF ELSE conditions during the message code. If the message is not displayed ( ELSE), Fire the Outbound Plug to the other view.

    I.e if the Error occurs & message is displayed, it will not fire the Outbound Plud, only in other case ELSE, it will be fired.

    or you can use "Cancel Navigation" parameter when you call the message & give it a value "X" ( define a boolean type context attribute"

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 23, 2007 at 01:50 PM

    Hi Akshata.

    This depends on the service pack of you system. In newer SPs you can transfer

    the parameter cancel_navigation to the message methods of the message

    manager.

    If you do not find the parameter there you have to check the system messages for

    error and then just return to prevent the firing of plugs or what ever.

    Cheers,

    Sascha

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2007 at 03:55 AM

    Hi Akshsataha. If your problem is still not resolved, see this thread:

    Error Message - stop there

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 26, 2007 at 05:01 AM

    Hi Akshatha,

    If you check your validations in WDBEFOREACTION when ever a message is reported it will not reach the other actions.

    If you want some actions to be performed even any message is reported in WDBEFOREACTION,

    go to actions tab and change the standard event to the other option available.

    Regards

    Abhimanyu L

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 26, 2007 at 01:16 PM

    Hi Aks,

    Initial days I was using the logic suggested by Phani. It turned out to be cumbursome when you have so many fields whith so many type of validations. I came accross CANCEL_NAVIGATION and it worked fine for me. However, is_empty( ) is dumping for me.

    Here is the piece of code. I am on ECC 6.0 SP 11.

    MODULE...
    * Check for error Messages
    if item_Text is initial.
    
      l_current_controller ?= wd_this->wd_get_api( ).
    
      CALL METHOD l_current_controller->get_message_manager
        RECEIVING
          message_manager = l_message_manager.
    
      lv_error = 'Field Empty'.
    
    *Report message
      CALL METHOD l_message_manager->report_t100_message
        EXPORTING
          msgid = ZXXXXXX_CLASS'
          msgno = '000'
          msgty = 'E'
          p1    = lv_error
         CANCEL_NAVIGATION        = abap_true .
    endif.
    
    wd_This->Fire_Out_View1_Plg(  ).
    
    ENDMODULE....
    

    Regards,

    Murali.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      IF anybody is doing NET310 exercises .. theres one place it says we have to create a new method for vali

      dations called check_input... If we do this the we would be navigated to the output view and we see the error messages in the output view...

      IF you do the same exercise using the WDDOBEFOREACTION method of input view it will work correctly i.e the error messages will be shown in input view itself....

      I think i am doin it on the older versions without SP's ,if you have the version rite then u might get the cancel_navigation parameter,..

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.