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
1,116

Hi:

     我的业务场景是:当用migo做101收货时,自动触发501的收货。所以我在BAdi “MB_DOCUMENT_BADI”的方法“MB_DOCUMENT_UPDATE"里,通过调用BAPI "/AFS/BAPI_GOODSMVT_CREATE" 来实现501的收货。现在的问题是:migo可以正常完成并生成101的凭证,但是501的凭证生成不了,后来debug发现,是在调BAPI时报M7 299的错误,以下是关于M7 299错误的详细分析:

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.

从documentation来看,migo和bapi都会执行function module MB_CREATE_GOODS_MOVEMENT,但是在BAdi里调用bapi执行的时候,migo并没有做commit work的操作,因此导致了这个错误。

急切地需要您的帮助,谢谢。

View Entire Topic
YapingGao
Employee
Employee
0 Likes

自动触发501收货的条件是什么?

满足所有条件后,一定要生成501收货吗,还是要看101收货生成的状态才最后决定生成501收货?

如果答案是“否”,可以试试用异步RFC调用的方式。

0 Likes

Hi,

This is a restrictions from standard SAP (not from AFS), after each call of /AFS/BAPI_GOODSMVT_CREATE, you have to carry out a commit work.

Regards,

Mehdi