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: 

Performace comparision on Commit

Former Member
0 Kudos

Hello All..

I am using a submit report between a Loop statement and using commit work and wait statement. As this loop may have a lot of records, so I just want to know that which of the below statement is good, performance-wise.

COMMIT WORK AND WAIT.

or

COMMIT WORK.

WAIT UP TO 1 SECONDS.

or

BAPI_TRANSACTION COMMIT.

Thanks,

Sanket Sethi

4 REPLIES 4

SuhaSaha
Advisor
Advisor
0 Kudos

Hello Sanket,

For sure i would not use - COMMIT WORK. WAIT UP TO 1 SECONDS.

I think you should make a decision on whether to use Synchronous or Asynchronous updates?

BR,

Suhas

Former Member
0 Kudos

Hello Suhas..

Thanks for your inputs.. I am using as of now, COMMIT WORK AND WAIT. I am just checking on SDN for enhance my knowledge on this tuff that what will be the best way to commit DB with some seconds wait before moving forward.

There will be 3 options for doing the same.. But which one will take more time and which one will take less. Kindly elaborate if you have some explanation on the same.

Thanks,

Sanket

Former Member
0 Kudos

Hi,

if you have a bigger loop and do a commit for each loop you could run into serios performance issues. I would calculate ~1 sec per loop.

Best would be to do the commit in one step for all entries. Maybe you can enhance or change the report.

Best regards

Robert

Former Member
0 Kudos

Hallo Sanket

that what you do is unfortunately wrong. You can not do commit in all loop, in every sy-tabix. First of all you have to make Paketsize ( 100 rows for example ). Then make commit when paketsize is achieve.

So, you do 100 loops, and then you make commit. In this case you do 1 commit in 100 loops, and not 100 commit for 100 loops, what will fast your program 100 times.

And you have to use commit work and wait.

1 s for 100 loops this is 100s and this is 1min and 40 sek. A ENORMOUS LOSS OF TIME.

With 1 commit in paketsize, you will be abble do the same thing 100 faster, so we have 1 s respondtime to DB. Still to much. SAP tell that Respondtime ( querry in and out to DB ) should be less the 1s, so you have to use COMMIT AND WAIT. System will calcuate the nessesery time.

BAPI_TRANSACTION COMMIT and COMMIT is the same.

Hope i help.

Regards,

Marek.