2022 Sep 22 4:34 PM
Hey there!
We have the following problem:
There is a standard function module that changes data on a database table.
Aftwerwards we use cl_http_client with methods create_by_url, send and get.
After using this class the ROLLBACK WORK does not work anymore.
We told the debugger to stop at COMMIT WORK but obviously a COMMIT WORK is not executed.
Before CL_HTPP_CLIENT ROLLBACK WORK works and the update was rolled back.
After class usage it doesn't.
Are there any hints/ documentation that usage of cl_http_client forces a commit?
Thanks for any hints
Enno
2022 Sep 22 5:01 PM
thorsten.franz.operatics just gave this hint:
ICF automatically triggers implicit DB commit during HTTP(S)/SMTP. Cleanest way to be able to rollback is to do all DB updates in update function modules because they will only be triggered by COMMIT WORK, not by a mere DB commit.
https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abendb_commit.htm
Thanks Thorsten! didn't find the hints to the implicit commits...
2022 Sep 22 4:46 PM
Is there an implicit commit work at some point? I do have a similar case at the moment which I did not solve yet.
Call function... Destination is such an example. It issues an implicit commit. A method like cl_gui_cfw=>flush() does such a call deep inside.
Open a table viewer in a second window/tab and check after which function/statement the data change appears. Because normally without a commit a second process like table viewer must not "see" the change until a commit.
2022 Sep 22 4:59 PM
thorsten.franz.operatics just gave this hint:
ICF automatically triggers implicit DB commit during HTTP(S)/SMTP. Cleanest way to be able to rollback is to do all DB updates in update function modules because they will only be triggered by COMMIT WORK, not by a mere DB commit.
https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abendb_commit.htm
2022 Sep 22 5:01 PM
thorsten.franz.operatics just gave this hint:
ICF automatically triggers implicit DB commit during HTTP(S)/SMTP. Cleanest way to be able to rollback is to do all DB updates in update function modules because they will only be triggered by COMMIT WORK, not by a mere DB commit.
https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abendb_commit.htm
Thanks Thorsten! didn't find the hints to the implicit commits...
2022 Sep 22 5:44 PM
So, you are in the case of "ICF client program", and the commit would happen when you call the method RECEIVE:
2022 Sep 22 5:57 PM