‎2019 Mar 08 10:35 AM
Hello,
in my programm I have to do some stock transfers.
So I have a call of function 'MB_CREATE_GOODS_MOVEMENT'. Before calling function 'MB_POST_GOODS_MOVEMENT' I have to do some actions. If one of these action does not succeed I dont want to finish the transfer but continue with the next transfer position. Now the next call of 'MB_CREATE_GOODS_MOVEMENT' results in EMKPF-SUBRC = 5.
This behaviour is like described in documentation of both functions.
How can I manage to have more than one valid call of 'MB_CREATE_GOODS_MOVEMENT'?
Is there a possibility to undo a call of 'MB_CREATE_GOODS_MOVEMENT'?
Regards, Hubert
‎2019 Mar 08 4:19 PM
MB_CREATE_GOODS_MOVEMENT is of MBWL function group.
The function group contains function MB_MOVEMENTS_REFRESH. Most probably the function would do the trick, clear MBWL global data and allow subsequent call of MB_CREATE_GOODS_MOVEMENT. That's my educated guess, though. No guarantees here.
Why don't you use BAPI_GOODSMVT_CREATE?
HTH, best regards
Dominik Tylczyński
‎2019 Mar 08 3:01 PM
If you want to do a call without anything in memory, you could create a wrapper functionmodule that is RFC enabled, executing these 2 functionalities and call it in destination 'NONE'.
‎2019 Mar 08 4:19 PM
MB_CREATE_GOODS_MOVEMENT is of MBWL function group.
The function group contains function MB_MOVEMENTS_REFRESH. Most probably the function would do the trick, clear MBWL global data and allow subsequent call of MB_CREATE_GOODS_MOVEMENT. That's my educated guess, though. No guarantees here.
Why don't you use BAPI_GOODSMVT_CREATE?
HTH, best regards
Dominik Tylczyński