10-08-2008 11:30 AM
Hi,
I have the following requirement:
Need to check if the material is blocked and return some error code before passing it for the creation of sales order.
The sales order creation is being done using a standard BAPI function module and I need to modify the customer exit (function module exit) to add my logic to check the material.
Can anyone help me in how to proceed with working with function-exits? Where to add my logic?
I am new to this and any help would be appreciated.
Thanks,
Mohit
10-10-2008 8:38 AM
Hi,
Try using the exit MV45AFZZ or check out other exits for sales document processing thru SPRO-> Sales and Distribution->System Modifications->User Exits
and check out the documentation for each exit. it will tell u in detail why these exits r used & in which scenario.
Since ur sales order is also being created using a BAPI the problem becomes more complex..
Btw..can u tell me which BAPI is it?
Is it BAPI_SALESORDER_CREATEFROMDATA?
Regards,
Amit
10-10-2008 8:43 AM
10-10-2008 8:45 AM
in the include Mv45afzz , routine userexit_save_document_prepare you can do that check and raise the meessage. this logic/include will trigger from the BAPI also.
05-26-2009 4:14 AM
Hi,
I just want to add something based on my experience.
I had checked that BAPI_SALESORDER_CREATEFROMDAT2 calls the user exit in MV45AFZZ. I checked this for USEREXIT_MOVE_FIELD_TO_VBAP, USEREXIT_MOVE_FIELD_TO_VBKD, USEREXIT_PRICING_PREPARE_TKOMP, and USEREXIT_SAVE_DOCUMENT_PREPARE. So I think all the user exit in MV45AFZZ should be called.
Regards,
Teddy Kurniawan