Skip to Content
3
Aug 21, 2009 at 09:29 AM

MV45AFZZ cancel document saving process

4513 Views

Hi,

I'm investigating an option on how to cancel the saving process of a document in user-exit include MV45AFZZ from within transaction VA01/VA02.

Currently I've tried to do some MESSAGE E in FORM USEREXIT_SAVE_DOCUMENT_PREPARE or FORM USEREXIT_SAVE_DOCUMENT w/o any success so far.

Of course MESSAGE A is possible but does a hard break and is not the best solution at all.

Setting any screen like SET SCREEN 0 or LEAVE TO SCREEN 0 or any similar things did not work either.

What am I trying to do? I would like to check some VBAP/VBAK fields if certain conditions are met and cancel the saving process if necessary - of course without dropping the complete document.

I've already searched the forum here and only found hints like those already mentioned above - but nothing really specific.

Another thing which came into my mind is what about storing some a line into the incomplete log of the transaction to prevent from saving? However, I did not found any function module to add some lines to the log in user-exit MV45AFZZ so far.

Any hints on how to accomplish this?