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: 

Function module exit help

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

which bapi are you using ?

Rhea.

former_member188685
Active Contributor
0 Kudos

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.

0 Kudos

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