Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_TRANSACTION_COMMIT ?

Former Member
0 Kudos

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!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

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

0 Kudos

I call the BAPI to save data into a database table. Do I have to call BAPI_TRANSACTION_COMMIT?

0 Kudos

Yes, for any kind of database updation you should have a Commit Work.

Kuntal

0 Kudos

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.

0 Kudos

thanks!

How do I handle the error occurs in my FM for example

if sy-subrc <> 0.

  • handle error here...

endif.

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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.