cancel
Showing results for 
Search instead for 
Did you mean: 

Avoide incorrect order to get saved (clicking workcentre/ back button)

Former Member
0 Kudos

Dear All,

We have put validation on eh_onsave to avoide user to save order if mandatory fields are not filled. But user is able to save order by clicking workcentre or back button. In that case he gets popup which asks to Do you want to save? Yes, No, Cancel.

If he clicks Yes, he is able to save order without entering mandatory fields. Please suggest best possible solution to avoid save without clicking on save button.

Thanks and regards

Pankaj Kumar

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member202474
Contributor
0 Kudos

Hi ,

I feel the best part to handle this functionlaity is to write the code in the badi 'ORDER_SAVE". Because irrespective of the location from where you are trying to save this would get called...........But still i will give you the solution if you want to do the coding in the classes itself.

Do the coding in the method 'IF_BSP_CONTROLLER~HANDLE_EVENT'....................this triggers when the user clicks 'Yes' from the popup. Just keep a BP and check , either the window method or the view method would get called.

Hope this helps.

Regards,

Ruby.