Skip to Content

Call BAPI_GOODSMVT_CREATE several times without COMMIT Issue

Apr 11 at 05:19 PM


avatar image


I have a requirement which is to create many Goodsmovements for the same material :First 101 and then 343. If 101 fails, then 343 shoundn't be created. If 101 works fine and 343 is wrong, then 101 shouldn't be created.

For that I call BAPI_GOODSMVT_CREATE at first time to create 101, but without doing a COMMIT. After that and if 101 doesn't have any error, I would have to call BAPI_GOODSMVT_CREATE for 343 movement, but at that time I am getting an error because I don't be allowed to do a second bapi call without doing COMMIT work.

How I could achieve that?

Thanks for your time and best Regards

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Nic Teunckens Apr 11 at 06:45 PM

I haven't done anything like this and it feels somewhat strange to me, but you could possibly 'predict' the results using the "TESTRUN"-Parameter? Test the BAPI using your GDSMVT and only proceed to 'real' Execution when you are quite sure what will work ...

Also there are some hints in the "Goods Movement via BAPI"-Wiki (link) and SAP-KBA's 520813 "FAQ on Good Movement BAPI" (link) ...

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Thanks for your reply Nic.

In fact, that solution was the one’s I had taken into account to achieve my requirement if there wasn’t any chance to do that without TEST.

Best regards.


I though as much, however I wanted to raise this as the first / best option.

I don't know if you can get the multiple BAPI-Calls to work in sequence by calling them in a different LUW using DESTINATION 'NONE'? Even if that would work, it still seems like a 'hacked solution' so I wouldn't be in favour of that ...

The BAPI uses FM "MB_CREATE_GOODS_MOVEMENT" internally : if you are allowed to use anything other than a BAPI you might try that FM directly (as a last resort)?

Personally, I would use the 'TEST' and if that doesn't work out, stick to Posting with COMMIT and possibly Retracting the GoodsMovements when necessary ...


Hi Adrian,

As stated in the BAPI Documentation, you can use Parameter TESTRUN .

"You can use a simulation function before posting the goods movement to check how the data is updated in the database."



Adrián Mejido Apr 16 at 04:27 PM

I have achieved that calling the bapi in TESTRUN first and if all is right, then I call with COMMIT.

Best Regards

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Great, please close the Question, marking it as Answered ...