Showing results for 
Search instead for 
Did you mean: 

Execute custom program after sales order is being saved into database

0 Kudos

Hello Experts, 

I would like to run a custom program after the order is being saved into database.

What would we like to achieve?

We would like to run BAPIs right after the sales order is saved so we can pull data from the database and run our BAPIs with those parameters.

I have found a place in program SAPMV45A at the end of include MV45AF0B_BELEG_SICHERN (line 3371) where the order should have been created, this is where we placed our new code.


What we have tried and did NOT work?

There is an update task running in parallel to MV45AF0B_BELEG_SICHERN what is actually saving the order into database.

Unfortunately, the task is not finished running until the end of MV45AF0B_BELEG_SICHERN.

This means there is no sales order data saved into the database at the moment our code is running.

We also tried to put our code in program MV45AZZ, but this is called from include MV45AF0B_BELEG_SICHERN before the commit statement.

Please help us identify the enchantment point(s) where the sales order is already saved into database and we could run our custom code.

Any other suggestions are also welcome.

View Entire Topic
0 Kudos


0 Kudos

Hello, one concern please. I see in in the include description that the exit runs prior commit statement. Is this mean that the exit runs prior the order being saved?

I would like to run BAPI-s only after the order is saved.
Please correct me if I am wrong, so the order is saved already.

Text of the exit:

"This form is called at from form BELEG_SICHERN, before COMMIT".

0 Kudos

Please see comment above.