Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Detect Deletion Option in MV45AFZZ User-Exit SAVE_DOCUMENT_PREPARE

Former Member
0 Kudos

Hello!

Is there a possibility to detect if a user has pressed the delete-button for an order in VA02 in the given user-exit?

BR, EF

1 ACCEPTED SOLUTION

SimoneMilesi
Active Contributor
0 Kudos

You should use FORM userexit_delete_documen instead of SAVE_DOCUMENT_PREPARE

6 REPLIES 6

SimoneMilesi
Active Contributor
0 Kudos

You should use FORM userexit_delete_documen instead of SAVE_DOCUMENT_PREPARE

0 Kudos

Hi!

The problem is, that we have written a lot of code which performs checks when saving an order, whereby some parts don't work if the user deletes an order. SAVE_DOCUMENT_PREPARE seems to be called when somebody deletes an order as well, and this is where our coding should not be called! So, i have to find a way to detect when a deletion takes place to get sure that everything is as thought!

BR, EF

0 Kudos

i do not remember (and i got no way to test at the moment) if XVBAK-UPDKZ is filled with 'D'.

Otherwise in USEREXIT_DOCUMENT_DELETE activate a flag to test in SAVE_DOCUMENT_PREPARE

0 Kudos

Hi!

Both ideas sound good! I already tried to look for the field in XVBAK and YVBAK etc., but the only one i found is this: xvbak-UPD_TMSTMP ... a colleague also thought, that there should be something like UPDKZ, but i couldn't find it! I would prefer this version, but if nothing helps, then i will try to set a flag and act by this!

Thanks for your response!

0 Kudos

Hi Elmar,

The deletion indicator is very much available in the USEREXIT_SAVE_DOCUMENT. It is however a separate field which is xvbak_updkz. You can use the same for your purpose.

Regards,

Shashi Thakur

0 Kudos

Hi!

This works! I always misspelled this variable, so of course i couldn't find it!

BR, EF