10-13-2009 1:33 PM
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
10-13-2009 2:14 PM
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.