To remain in same screen after an error message in delivery?
In Delivery exit MV50AFZZ, we are facing an issue. we need two fields to be filled when doing goods issue. If those fields are not filled, we are throwing an error message. The issue is, after this error message pop up, it comes out of delivery screen on hit enter. So the details entered are lost and again we have to re-enter them in fresh transaction.
To avoid re-entering the input, we are trying to give the error message as soft error and to retain in the same delivery screen.
We tried different ways of changing the message type, either it saves the delivery after showing the message or stays in display mode after the message hence we are not able to feed the two required fields.
Making the two fields mandatory in customizing will not help as this is required for certain conditions only.
Could anyone please help.
Vinod Kumar replied
MV50AFZZ is the wrong exit. Use the BADI LE_SHP_DELIVERY_PROC, method :DELIVERY_FINAL_CHECK. After validation, fill the error log in the internal table parameter CT_FINCHDEL.
See the documentation of interface IF_EX_LE_SHP_DELIVERY_PROC (method : DELIVERY_FINAL_CHECK) for reference.