cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module MB_CREATE_GOODS_MOVEMENT cannot be executed

shaji_chandran
Participant
0 Kudos
5,599

Hello Friends,

I am invoking following 2 BAPI's from MII one after another.

1) BAPI_GOODSMVT_CREATE

2) BAPI_REPMANCONF_CREATE_MTS

First BAPI is getting executed successfully and it creates the Mat document number as well. But while calling second BAPI I am getting an error as "Function module MB_CREATE_GOODS_MOVEMENT cannot be executed".

Can anyone help me on this? I think both BAPI should execute in same transaction session to complete the transaction successfully at SAP.

MII Version 15.1 SP5

Thanks

Shaji Chandran

View Entire Topic
former_member185280
Active Contributor

Check the function module documentation. I think BAPI_GOODSMVT_CREATE is one of those functions that has to have a commit immediately after being called and before any other functions are executed so make sure that is the case and you are doing that. REPMANCONF may have a similar restriction. Also I think BAPI_GOODSMVT_CREATE is async in the background so even tho you get a mat doc returned the stock change or whatever may be locked or not visible yet to the next function if you call it right away. If you can't get them to both work at all even if you call them separately or whatever then it may be something else entirely.

Regards,
Christian

shaji_chandran
Participant
0 Kudos

Thanks Christian. Your solution is working fine. I have one more question, Is there way to execute both these BAPI's under same session. I mean to say either I want both BAPI's gets executed successfully or none of them.

Thanks

Shaji