‎2022 Jun 07 12:45 PM
Hi,
I have query. Which option gives best performance ?
Option 1 :- Committing record in loop per row.
Option2 :- Commit after loop, entire table in one go i.e. bulk commit.
e.g.
option1
LOOP AT it_mis INTO wa_mis.
INSERT z_mis_his FROM wa_mis .
COMMIT WORK.
CLEAR wa_mis.
ENDLOOP.
option 1
LOOP AT it_mis INTO wa_mis.
INSERT z_mis_his FROM wa_mis .
CLEAR wa_mis.
ENDLOOP.
COMMIT WORK.
‎2022 Jun 07 12:47 PM
make a trace, using transaction SAT for example, and you will find your answer.
(this problem is already known and discussed in IDOc integration)
‎2022 Jun 07 3:05 PM
Please edit your question, select your code and press the button [CODE], which makes the code appear colored/indented, it will be easier for people to look at it. Thank you!
‎2022 Jun 07 3:06 PM
I think it's more a question of ensuring database integrity. It's more critical than performance!
‎2022 Jun 07 4:12 PM
Hi santosh.b2,
for a bult insert, I would use
insert z_mis_his FROM table it_mis .
‎2022 Jun 10 8:36 AM