2012 Jul 26 7:03 AM
Hi All:
the error occurs when calling bapi "/AFS/BAPI_GOODSMVT_CREATE" in method "MB_DOCUMENT_UPDATE" in BAdi "MB_DOCUMENT_BADI".
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.
2012 Jul 26 7:43 AM
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 ?
2012 Jul 26 8:21 AM
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.
2012 Jul 26 8:25 AM
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 .
2012 Jul 26 8:51 AM
2012 Jul 26 8:59 AM
OK, try it and if you still having issues reply back for support.