on 07-23-2008 1:25 PM
Hi everybody,
I want to use the WDDOEXIT method to check some values. In error case, the view should not be leave.
The cancel_navigation( ) method in component controller has not the required effect.
With a message_manager->report_exception( ... ) a message is reported but the view can be change.
Is there a way to stop the view change?
Thanks and
kind regards
Christian
Hi Thomas,
is there any way to cancel the action in the WDDOBEFOREACTION method??
thanks Christian
Edited by: Christian Breitenbach on Jul 23, 2008 5:48 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should see what type of messages you are issuing. Different ones have different responses depending upon where in the phase model you are. Here is the link to the online help:
http://help.sap.com/saphelp_nw70/helpdata/EN/6c/7aae42cd7fb611e10000000a155106/frameset.htm
For instance I like to use the REPORT_ATTRIBUTE_ERROR_MESSAGE in my WDDOBEFOREACTION and it stops all further standard actions, navigation, and the WDDOMODIFYVIEW.
Hi Cristian
Why do you want to do validation in the WDDoExit method? How are you changing views? through a button? If you are using a button then check the values in the method for the button click and if you are not happy with the values then just dont navigate to the next view.
Just trying to understand what you are doing.
Regards
Thashin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
following scenario.
I have a popup with a tabstrip in it. On each tab is one view.
So to leave a view the user can change the tab or close the popup.
There is no problem to check values from context when the user press enter after some doing. But if the user only change a value in an input field and press the X on the edge of the popup to close it, how can I prevent, that the popup will be closed in case of an error??
thanks a lot
Christian
I think the WDDOBEFOREACTION is probably the best location for such validation logic. It will validate before the tab change. The only thing it won't catch is the normal close button of the popup. You just need to disble the close the button on the popup (during creation of the popup) and then add your own custom button to the popup to close it. Once it is a custom action it will be caught by the WDDOBEFOREACTION as well.
Hi again,
many thanks for your reply.
Because we already have a custom button on the popup to close it, we will disable the standard button. Than the problem will be easier to solve.
But in my oppinion it's real pity that there is no way in the hook method wddoexit to stop the exit.
best regards
Christian
I'm afraid that it is just too late in the Phase Model to try and alter the navigation within WDDOEXIT. It really wasn't what it was intended for. Really the Popup close situation is the one exception where WDDOBEFOREACTION really wouldn't work. I think more appropriate might be to have the standard close button on the popup fire the WDDOBEFOREACTION.
It is called by the Runtime, you never know when it is being called so you can not stop navigation.
This method is used specially to release locks if any
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.