Hi Tomas,
try with this:
try.
data: transaction_mgr type ref to if_os_transaction_manager.
data: transaction type ref to if_os_transaction.
transaction_mgr = cl_os_system=>get_transaction_manager( ).
transaction = transaction_mgr->get_current_transaction( ).
transaction->set_mode_update( oscon_dmode_direct ).
catch cx_root.
endtry.
set update task local.
your code
commit work.
I use this in some user exits