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: 

which user exit can be use after sales order created & insert to database?

Former Member
0 Kudos

i want to insert some sales order item by bapi after after sales order created & insert to database.which user exit can be use?

1 ACCEPTED SOLUTION

former_member181995
Active Contributor
0 Kudos

Do code in Include MV45AFZZ form FORM USEREXIT_SAVE_DOCUMENT

3 REPLIES 3

former_member181995
Active Contributor
0 Kudos

Do code in Include MV45AFZZ form FORM USEREXIT_SAVE_DOCUMENT

0 Kudos

This form is called at from form BELEG_SICHERN, before COMMIT.so the user exit don't insert sales order data to database yet,if i call to append some item data then,system will not find this sales order.

0 Kudos

Saving of Sales order to the database is being done in the asynchronous processing. So, will not find any place where you can update your Z table after the COMMIT to standarad database.

To avoid the inconsistency,

Either you can use the PERFORM .. ON COMMIT, this FORM will contain your logic to insert Z table

Or Wrap all your update logic in the FM and use CALL FM IN UPDATE TASK.

The best suitable place to call this FORM or FM is the USEREXIT_SAVE_DOCUMENT in the MV45AFZZ.

Regards,

Naimesh Patel