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

Performance Issue with BAPI_TRANSACTION_COMMIT

Former Member
0 Likes
851

Which is better performance wise?

I'm doing a mass change of final confirmation using BAPI_ALM_CONF_CREATE. I have more than 100 records for processing.

Should I do a commit work for each record processed?

LOOP AT ITAB.

CALL FUNCTION 'BAPI_ALM_CONF_CREATE'

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

ENDLOOP.

or

Should I do the commit work after processing all the records?

LOOP AT ITAB.

CALL FUNCTION 'BAPI_ALM_CONF_CREATE'

ENDLOOP.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Thanks in advance!

4 REPLIES 4
Read only

Former Member
0 Likes
631

You might get better performance by doing it at the end, but you might also end up with inconsistent data. You should do a commit after each LUW.

(You might not get any performance improvement by putting it at the end either. The COMMIT still has to do the same amount of actual work, less some overhead.)

Rob

Read only

JozsefSzikszai
Active Contributor
0 Likes
631

hi JB,

I would do it for each record separately. In case of doing it in one go, could lead to problems, if the update is asynchronous. On the other hand, if one reocrd is wrong, than you loose all changes.

ec

Read only

0 Likes
631

But is it ok do the COMMIT for each order or is it better to do it for each order and operation?

Read only

0 Likes
631

After each LUW (each BAPI call).

Rob