on 2012 Jul 26 7:14 AM
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错误的详细分析:
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的操作,因此导致了这个错误。
急切地需要您的帮助,谢谢。
Request clarification before answering.
自动触发501收货的条件是什么?
满足所有条件后,一定要生成501收货吗,还是要看101收货生成的状态才最后决定生成501收货?
如果答案是“否”,可以试试用异步RFC调用的方式。
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.