on 04-22-2009 12:14 PM
Dear Gurus,
How can we restrict the no. of sales orders for a customer ie. if we want to only allow the system to create say 3 orders for the particular customer in a particular month, and the system should not allow to create the fourth order for that month for that customer.
Hi Hariprasad
If you want to restrict then after creation of 3 sales orders , you need to block the customer data in XD02->extras->block customer data and then unblock the customer data next month
Regards
Srinath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hari,
I also suggest to use a userexit to prevent the order creation. For your users it might be better to use USEREXIT_MOVE_FIELD_TO_VBAK in Include MV45AFZZ. This exit is called after the header data were entered, so the users will not lose time with entering item data.
Best regards,
Joerg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hari
Blocking /unblocking customer every month will be an extra effort for end user.
Advisable is go for user exit.
Take help of ur abaper, use User exit USEREXIT_SAVE_DOCUMENT.
Write a code such that before saving sales order program will check VBAK table for the Sold to party (KUNNR) and number of sales orders created in SY-DATUM month i.e. current month.
If its already 3 then display an error message and exit. ie not save that sales order.
try and revert.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hari
In customization its not possible.
Blocking /unblocking customer every month will be an extra effort for end user.
Advisable is go for user exit.
Take help of ur abaper, use User exit USEREXIT_SAVE_DOCUMENT.
Write a code such that before saving sales order program will check VBAK table for the Sold to party (KUNNR) and number of sales orders created in SY-DATUM month i.e. current month.
If its already 3 then display an error message and exit. ie not save that sales order.
try and revert.
Hi Hariprasad Reddy
Then , you need to go with the USEREXIT_SAVE_DOCUMENT., and in user exit you have to include the program that if you enter the KUNNR number in the sales order system should not proceed and should give a message that KUNNR has crossed 2 orders. He can place again Next month.So you need to take the help of Technical consultant to include the logic in the USEREXIT_SAVE_DOCUMENT.
Regards
Srinath
Hi Hariprasad
You ca do it through user exit.
Take help of ur abaper, go to Prog. MV45afzz select User exit USEREXIT_SAVE_DOCUMENT.
Here write code :Create a copy of table VBAK with same customer number Sold to PArty (VBAK- kunnr) and document created date (ERDAT) in same month . count the sales docs in loop .
If counter is 3 system will exit from save event and will not save the document.
You can also add error message here.
Kind regards
Mandar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
After creating the 3 sales orders,block the customer by using XD05 T.Code.
In the next month unblock the customer till 3 orders are getting created using the same T.Code.
After that block it for that month also.
Regards,
Krishna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
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.