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

Former Member
0 Kudos

HI,

IN BAPI WHAT IS THE OF <b>BAPI_TRANSACTION_COMMIT</b> ?

THANK YOU

ASHOK KUMAR

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ashok,

When we use Bapi for any work it stores a data in result table.when we comes out from BAPI the data is not stored in the standard table where the data stored for that work.

this happens because the work we did form BAPI is in testrun status when we save that data then it comes into the particular table itself.for doing this we use BAPI_TRANSACTION_COMMIT .

simply to save data for testrun status to real sattus.

I think the problem is solved.

If useful rewrd me with points.

Thanks

Sanket.

4 REPLIES 4

former_member223537
Active Contributor
0 Kudos

Hi,

Consider a real time scenario, where you call BAPI_SALESORDER_CHANGE to change a sales order through remote call.

Once you do the changes, you need to explicity COMMIT the work(Changes done in the sales order) else the changes would be lost. Inorder to confirm/save the changes you call BAPI_TRANSACTION_COMMIT.

Best regards,

Prashant

Former Member
0 Kudos

Hi Ashok,

Commit work is used when you code directly in ABAP and make changes in the database and

want to commit the database.

BAPI_TRANSACTION_COMMIT is used when you make changes to the SAP database by calling

a BAPI from outside SAP and want to commit the database. When you use a BAPI, you can not

directly use commit work, instead you are allowed to use only

<b>BAPI_TRANSACTION_COMMIT</b>.

I would sasy the diff lies more in the way u want to call Commit Work.

With <b>BAPI_TRANSACTION_COMMIT</b> ..the external systems have a way of deciding on whether to

Commit or to Roll back Changes.

But with Commit Work u have to code it inside ure BAPI and the outside systems then have no chance or have

any hold over the commit...

so i guess the diff lies more in the way how u want to call commit ,either from outside or from within ure BAPI.

u can use both...

SAP though recommends using BAPI_Transaction_Commit and not using Commit_work in the BAPI...

but its upto u and ure middleware guy to decide how u want to do it..

Reward pts if found usefull

Regards

Sathish

Former Member
0 Kudos

HI,

BAPI_TRANSACTION_COMMIT is used when you make changes to the SAP database by calling a BAPI from outside SAP and want to commit the database. When you use a BAPI, you can not directly use commit work, instead you are allowed to use only BAPI_TRANSACTION_COMMIT.

Regards

Sudheer

Former Member
0 Kudos

Hi ashok,

When we use Bapi for any work it stores a data in result table.when we comes out from BAPI the data is not stored in the standard table where the data stored for that work.

this happens because the work we did form BAPI is in testrun status when we save that data then it comes into the particular table itself.for doing this we use BAPI_TRANSACTION_COMMIT .

simply to save data for testrun status to real sattus.

I think the problem is solved.

If useful rewrd me with points.

Thanks

Sanket.