Application Development and Automation 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: 
Read only

BAPI_TRANSACTION_COMMIT ?

Former Member
0 Likes
1,431

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
Read only

Former Member
0 Likes
1,288

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
Read only

Former Member
0 Likes
1,288

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

Read only

0 Likes
1,288

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

Read only

0 Likes
1,288

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

Kuntal

Read only

0 Likes
1,288

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.

Read only

0 Likes
1,288

thanks!

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

if sy-subrc <> 0.

  • handle error here...

endif.

Read only

0 Likes
1,288

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

Read only

Former Member
0 Likes
1,289

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

Read only

0 Likes
1,288

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.