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: 

Can i write like this ... will it work

Former Member
0 Kudos

Hi,

Can i write like below...


loop at itab. 
    --- populate bapi tables with itab data. 

    --- Call BAPI
endloop. 

Call bapi_transaction_commit. 

in the above example, lets take if i am changing sales orders, after i change 10 sales orders, can i commit all of them at one shot or for every bapi call do i need to commit it.

Thanks

1 ACCEPTED SOLUTION

former_member212653
Active Contributor
0 Kudos

You have to call BAPI_TRANSACTION_COMMIT after each BAPI call, i.e. inside the LOOP in your case. If its outside the loop it will only update the database with the last call.

1 REPLY 1

former_member212653
Active Contributor
0 Kudos

You have to call BAPI_TRANSACTION_COMMIT after each BAPI call, i.e. inside the LOOP in your case. If its outside the loop it will only update the database with the last call.