on 2019 Jul 15 1:55 PM
Hello Friends,
I am invoking following 2 BAPI's from MII one after another.
1) BAPI_GOODSMVT_CREATE
2) BAPI_REPMANCONF_CREATE_MTS
First BAPI is getting executed successfully and it creates the Mat document number as well. But while calling second BAPI I am getting an error as "Function module MB_CREATE_GOODS_MOVEMENT cannot be executed".
Can anyone help me on this? I think both BAPI should execute in same transaction session to complete the transaction successfully at SAP.
MII Version 15.1 SP5
Thanks
Shaji Chandran
Request clarification before answering.
Check the function module documentation. I think BAPI_GOODSMVT_CREATE is one of those functions that has to have a commit immediately after being called and before any other functions are executed so make sure that is the case and you are doing that. REPMANCONF may have a similar restriction. Also I think BAPI_GOODSMVT_CREATE is async in the background so even tho you get a mat doc returned the stock change or whatever may be locked or not visible yet to the next function if you call it right away. If you can't get them to both work at all even if you call them separately or whatever then it may be something else entirely.
Regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Most of the time I have seen BAPI_GOODSMVT_GETDETAIL called in a loop until it gets a positive response for the mat doc before moving on to the next step. In terms of a rollback of the movement if the conf fails I think you would have to code the logic to do the reversal of the goods movement.
Typically for these kinds of situations I recommend moving things back into SAP by either creating a custom rfc to wrap the logic or enhancing a standard bapi if possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.