cancel
Showing results for 
Search instead for 
Did you mean: 

Cancel_navigation( ) not working

ArtiBhat
Associate
Associate
0 Kudos

Hi All,

Cancel_navigation( ) is not working. I am keeping the method in Wdbeforenavigation itself.

Could anyone give me the reason why this is happening?

I have three buttons on the view. EDIT, DISPLAY, SAVE.

When user clicks on the save button and any one of the inputfields on view is empty then i am displaying the warning and using the cancel_navigation method to stop the navigation in the Application.

But this is not happening.

Earlier I was displaying the Attribute_errror_message and it was stoping the navigation by setting the parameter cancel_navigation to ABAP_TRUE.

Problem with the Attribute_errror_message is that the message is getting displayed thrice for which i dont know any reason. So i switched to this alternative.

Could anyone spend some time to read above description and suggest me some solution.

It is needed urgently.

Regards,

Arti.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi arti......

a solution for you...

instead of going for cancel_navigation.....

you just stop firing the plug.

ex:

int the save event method:

1) first check teh values.....

if values not empty,

firee the plug.

else.

throw an error message.

---regards,

alex b justin

ArtiBhat
Associate
Associate
0 Kudos

Hi Alex,

As described I am not firing the plug if the condition is not met. I am interested in stopping the user to access other functionalities on the view, alongwith stopping navigation to other parts of the Application, like to click on the EDIT or DISPLAY button . Firing the plug is not intended here.

Rgds,

Arti.

Former Member
0 Kudos

hi arti........

if you are going to have only these two buttons.... then you can disable or mak tehm nvisible dynamically.

---regards,

alex b justin