cancel
Showing results for 
Search instead for 
Did you mean: 

MV50AFZ1 - USEREXIT_SAVE_DOCUMENT_PREPARE

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

eduardo_hinojosa
Active Contributor
0 Kudos

Hi Mario,

Check Note 198137 - VL10: Customer-specific enhancements / user exits, it will help you.

Regards,

Eduardo

Answers (0)