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: 

Delivery User Exit MV50AFZ1 Workd in VL01 but Not VL10

former_member303185
Participant
0 Kudos

Dear Guru,

I have put validation in Delivery User Exit, If no serial Number in Sales Order Then Give Error during Delivery Creation and its work perfectly with using Transaction Code VL01n But When I schedule BG Job for Delivery Creation Through VL10 Tcode batch Job Failed when serial number not assigned in SO.

I write My code in MV50AFZ1 in form FORM USEREXIT_MOVE_FIELD_TO_LIKP as below.

*Select Notification Number with reference to Sales Order Number

SELECT SINGLE QMNUM INTO VBAK-QMNUM

FROM VBAK WHERE VBELN = LIPS-VGBEL.

*Select Priority with reference Notification

SELECT SINGLE PRIOK

INTO L_PRIOK

FROM VIQMEL

WHERE QMNUM = VBAK-QMNUM.

*Rule Applicable Only For W Priority Case

IF L_PRIOK = 'W'.

SELECT SINGLE OBKNR INTO L_OBKNR

FROM SER02 WHERE SDAUFNR = LIPS-VGBEL.

*If No Serial Number in Sales Order Give Error and Exit.

IF SY-SUBRC NE 0.

MESSAGE E999(ZZ) WITH 'No Serial Number Assign in Sales Order' LIPS-VGBEL.

RETURN.

EXIT.

ENDIF.

Could you help me on this issues

1 REPLY 1

david_lees
Participant
0 Kudos

As per note 415716 you should not be using this exit for the direct output of error messages:

https://service.sap.com/sap/support/notes/415716

If you must issue error messages then the note explains how to use the delivery creation log which may help in your analysis.