Please also note that you could do a loopback with a perform on commit to the class (need to be adapted for instance).
To do so create a module pool with 2 forms :
form register.
perform loopback on commit level 2147483647.
endform.
form loopback.
ZCL_MY_CLASS=>MY_LOOPBACK_ENTRY( ).
endform.
Please also note that IF_OS_TRANSACTION~SAVE_REQUESTED is raised on %_before_commit,
while PERFORM ON COMMIT is raised on %_commit, so a few later on.
This could be usefull when you need to register FM in update task at the very last moment.
Usefull link on Commit sequence :https://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm
And perform on commit : https://help.sap.com/abapdocu_70/en/ABAPPERFORM_SUBR.htm