Application Development and Automation 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: 
Read only

M7299 - Function module MB_CREATE_GOODS_MOVEMENT cannot be executed

Former Member
0 Likes
3,966

Hi All:

      the error occurs when calling bapi "/AFS/BAPI_GOODSMVT_CREATE" in method "MB_DOCUMENT_UPDATE" in BAdi "MB_DOCUMENT_BADI".

Diagnosis

The function module MB_CREATE_GOODS_MOVEMENT is called up for the second time. After it was called up the first time, the function module MB_POST_GOODS_MOVEMENT was called, but a COMMIT WORK was not carried out in the calling program.

As running the two function modules again would result in the database being incorrectly updated, processing is terminated. System Response Procedure Please ensure that a COMMIT WORK is set after you call up the function module MB_POST_GOODS_MOVEMENT.

     According to the Diagnosis, it seems like that calling bapi in BAdi "MB_DOCUMENT_BADI" is not possible, because the migo have not finished.  no commit work was carried out.

    But I really need this, it's the business scenario customer required.

      any help is expected.

5 REPLIES 5
Read only

laurent_fournier2
Contributor
0 Likes
2,102

Hi,

As the error says, somehow the bapi is called twice without a commit statement between. Can you please be more specific about the situation ? Are you talking for a customer or standard transaction ? Can you describe the whole process ?

Read only

0 Likes
2,102

To  Laurent:

     The scenario is: it triggers the GR of '501' automatically when doing GR of '101' using migo,

     so  i call the bapi "/AFS/BAPI_GOODSMVT_CREATE"  in BAdi MB_DOCUMENT_BADI~MB_DOCUMENT_UPDATE.

Read only

0 Likes
2,102

Hi again,

Since you have the commit error, you must find another way to post the 501 movement. Try a function call with the addition in background task in order to avoid the double posting without commit .

Read only

0 Likes
2,102

THX, I'll have a try.

Read only

0 Likes
2,102

OK, try it and if you still having issues reply back for support.