Skip to Content
0
Former Member
Jan 25, 2009 at 02:25 PM

MV50AFZ1 - USEREXIT_SAVE_DOCUMENT_PREPARE

1625 Views

Hi experts,

I'm using program MV50AFZ1 - USEREXIT_SAVE_DOCUMENT_PREPARE.

My goal was to do a validation for TR: VL01N and in the, depend of the cenario, give a error message. It's working fine. My problem is that now i have to do the same validation but now for the TR: VL10A.

This transaction allows you to process, for example, 20 orders in background (not like one by one with VL01N). If the validation for the 1º fails and lauch a message error the others fail as well.

My goal is, despite the error in one or two order's, the others proceed.

Code example:

if sy-tcode = 'VL10X'.

clear: xlips, xlips[].

clear: xvbfa, xvbfa[].

else.

MESSAGE e047(z....).

endif.

I'm not sure i can simply delete xlips and xbfa. The goal was, for the ones who fail the validation, dont create any subsequent documents.

Do you know the best way to do this? Is there any other way to tell the system to proceed with all the other's insted of the ones who fail the validation?

Thanks,

Mário.