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: 

Sales Order User Exit

Former Member
0 Kudos

I need to throw an error for an invalid plant when saving a sales order. I wrote condtion in include MV45AFZZ but when i save the sales order it show the error and not returning to the line item to edit insted it sohws popup 00010 item not found and getting saved. how to resolve this issue to avoid saving the sales order if plant does not match.

2 REPLIES 2

former_member188685
Active Contributor
0 Kudos

check the Include MV45AFZB

here you can validate the item , since it tiggers for each and every item, and stays in the same screen.

check the below form.

*&---------------------------------------------------------------------*
*&      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.

endform.

0 Kudos

Solved