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

Can i write like this ... will it work

Former Member
0 Likes
362

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

Former Member
0 Likes
327

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

Former Member
0 Likes
328

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.