‎2010 Mar 15 12:52 PM
Hi all,
I have a dialog program which uses a BDC.
This batch input calls another code which contains a BDC.
At the end I check the subrc and if it is 0 I do COMMIT WORK AND WAIT.
The problem is that after the COMMIT the session end and returns to the calling BDC but part of the code was after the COMMIT was skipped.
How can I overcome this?
Hagit
‎2010 Mar 15 1:03 PM
Hi,
Instead of explicit options pass ctu_params.
wa_ctuparams-dismode = 'N'
wa_ctuparams-updmode = 'S'
wa_ctuparams-rawcommit = 'X' "Important. This allows the called transaction to continue even after the commit.
"Check F1 help on this.
CALL TRANSACTION ...
USING i_bdcdata
OPTIONS FROM wa_ctuparams.Thanks,
Vinod.
‎2010 Mar 16 6:20 AM
Hi Vinod,
Thanks, this works.
But what do I do when I use BAPI?
Is there a solution for this too?
Thanks,
Hagit
‎2010 Mar 16 6:35 AM
Hi,
Are you using Z-BAPI? 99% of the standard BAPIs doesn't have the implicit COMMIT for this reason. By the way what is the BAPI you are using?
In case of Z-bapi, don't COMMIT in BAPI. Call the COMMIT outside BAPI.
Thanks,
Vinod.
‎2010 Mar 16 7:20 AM
Hi,
I'm using BAPI_GOODSMVT_CREATE.
After the BAPI I wrote The COMMIT but I need to perform another batch input which is not executed due to this command.
Hagit
‎2010 Mar 16 11:27 AM
Hi again,
any ideas?
I tried to remove the COMMIT command after the BAPI but the created documents are not save in the DB and I cannot continue to the next transaction.
Hagit
‎2010 Mar 16 1:02 PM
Hi
Try to use FM BAPI_TRANSACTION_COMMIT after your BAPI.
Also be sure that no 'X' in TESTRUN field when you call BAPI.
Also ,in return,what do you recieve?
Best Regards
Yossi Rozenberg
‎2010 Mar 17 6:12 AM
Hi Yossi,
I already tried to use this FM but got the same results.
Immediately after the COMMIT the program returns to the calling BDC.
Thanks,
Hagit
‎2010 Mar 17 2:36 PM
Hi,
Passing RAWCOMMIT = 'X' hold good even in this case also. Are you facing any issue with this solution? If yes, please explain the problem in detail.
Thanks,
Vinod.
‎2010 Mar 17 3:33 PM