Sales Order Enhancement
Sales Order Enhancement
Introduction
Although SAP allows a material number to be entered on a sales order more than once, in some cases this is not
considered best practice for many businesses. Often, this can cause confusion with the customer and is best
corrected by updating the quantity on the existing order line instead of entering duplicate materials on the order.
MV45AFZB
*&---------------------------------------------------------------------*
*&
Form USEREXIT_CHECK_VBAP
*&---------------------------------------------------------------------*
*
*
*
This Userexit can be used to add addtional logic for
*
*
checking the position for completeness and consistency.
*
*
*
*
US_DIALOG - Indicator, that can be used to suppress
*
*
dialogs in certain routines, e.g. in
*
*
copy mode.
*
*
*
*
This form is called from form VBAP_PRUEFEN_ENDE.
*
*
*
*----------------------------------------------------------------------*
FORM userexit_check_vbap USING us_dialog.
*---------------------------------------------------------------------*
* Give the user a warning message if a material number has
* already being entered on the sales order.
*---------------------------------------------------------------------*
LOOP AT xvbap
WHERE matnr EQ vbap-matnr
AND posnr NE vbap-posnr
AND kwmeng NE 0.
MESSAGE i001(vl) WITH 'Material is already on the order'.
ENDLOOP.
*---------------------------------------------------------------------*
ENDFORM.
"userexit_check_vbap
Conclusion
Duplicate materials on a sales order can be easily resolved by simply notifying the user that the material already
exists on the sales order. The user can then taken corrective action by updating the quantity on the original
material order line