on 04-13-2007 6:36 AM
Sir / Madam,
While making sales order by VA01 , duplicate material also accepted by system .There should be no duplicate material in sales order list.
please suggest solution.
Thanks.
Dear All,
I have found this web page where a code is embedded:
You can issue a warning message to the user by adding some ABAP code to the User Exit called USEREXIT_CHECK_VBAP in the program MV45AFZB.
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
Rewards point if it helps
Issuing a warning message when duplicate materials are entered on a sales order | SAP-Advisor.c...
Best Regards,
Ignacio.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You should use userexit USEREXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ and not USEREXIT_SAVE_DOCUMENT,.The reason behind this is prepare userexit is activated just before saving the document,so at the time of saving if the logic which you will give is not satisfied then you can set warning or error in the code.
Rewards points if useful.
Regads,
Amrish Purohit
Message was edited by:
AMRISH PUROHIT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use FORM USEREXIT_SAVE_DOCUMENT.
in the include MV45AFZZ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no , how u can u set system not to accept
check
mat qty plant
001 10 PP1
002 20 PP1
0001 20 PP2
S o cannt stop system in this case , if u want then go for user exit .
Regards
Prabhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
At time we should be use Material listing /Exclusion .
Rewards point it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.