‎2009 Mar 06 11:39 PM
Do I have to call the bapi BAPI_TRANSACTION_COMMIT when I create a new function module (Remote enable) for other non-sap application. this function module updates data to SAP also. Thanks!
‎2009 Mar 09 8:22 PM
Hi Anthony,
Yes you need BAPI_TRANSACTION_COMMIT in a RFC.
We have a process in which POs are created through a RFC and without the BAPI_TRANSACTION_COMMIT the POs weren't created.
We had a little problem though with the calling of the BAPI_TRANSACTION_COMMIT using .NET Connectors, but what we did was to create a Z Function Module that Call the BAPI_TRANSACTION_COMMIT and that fix the problem.
Regards,
Gilberto Li
‎2009 Mar 07 3:16 AM
BAPI_TRANSACTION_COMMIT will work as same as COMMIT WORK for report programs. Since COMMIT WORK does not work from outside world we need to use BAPI_TRANSACTION_COMMIT. I hope in case if you used any related commands in your RFC to update the data then only we need to use BAPI_TRANSACTION_COMMIT. For all RFC function modules we no need to use.
Regards,
~Satya
‎2009 Mar 09 5:04 PM
I call the BAPI to save data into a database table. Do I have to call BAPI_TRANSACTION_COMMIT?
‎2009 Mar 09 5:11 PM
Yes, for any kind of database updation you should have a Commit Work.
Kuntal
‎2009 Mar 09 5:11 PM
HI,
You need to call the BAPI_TRANSACTION_COMMIT or COMMIT WORK in the RFC ebnabled Function Module to update the data to the database if you are directly updating using statement's INSERT MODIFY DELETE. In case if you are using any other FM then COMMIT work might be handled insight the other FM then it not required.
‎2009 Mar 09 5:16 PM
thanks!
How do I handle the error occurs in my FM for example
if sy-subrc <> 0.
handle error here...
endif.
‎2009 Mar 09 5:20 PM
You can raise exception for each kind of error occured in your FM, for coding related help, check any standard function module's exception.
Kuntal
‎2009 Mar 09 8:22 PM
Hi Anthony,
Yes you need BAPI_TRANSACTION_COMMIT in a RFC.
We have a process in which POs are created through a RFC and without the BAPI_TRANSACTION_COMMIT the POs weren't created.
We had a little problem though with the calling of the BAPI_TRANSACTION_COMMIT using .NET Connectors, but what we did was to create a Z Function Module that Call the BAPI_TRANSACTION_COMMIT and that fix the problem.
Regards,
Gilberto Li
‎2009 Mar 09 10:24 PM
Thanks!
Actually I found that we can call it or not depends on our own design. if external Apps call BAPI_TRANSACTION_COMMIT so we don't have to call it in our zBAPI.