04-04-2014 9:10 AM
Hi,
I don't know, how to release a lock, after locking exclusive.
We're locking our BOPF Object like this:
o_task_srv_mngr->retrieve(
exporting
iv_fill_data = abap_false
iv_node_key = /cenitapm/if_bo_pw_task_c=>sc_node-pwtsk " Node
it_key = t_key " Key Table
iv_edit_mode = /bobf/if_conf_c=>sc_edit_exclusive
importing
eo_message = o_message
).
Now how do I release the lock again?
I know, It is released after a save of the transaction manager, but how do i achieve an unlocking without that save?
Regards David
04-04-2014 11:54 AM
After some investigation, I came to following result:
Locks are released on commit or rollback.
So if I want to release an exclusive lock, I have to rollback everything in the current session.
After feeling limited by this design in the first place, I now think, this is a great way to secure my data integrity.
I only want to release an exclusive lock if I don't want to save my data, or if I want to save it 😉
I just have to ensure, all data not belonging to the actual transaction is saved before setting an exclusive lock to another object.
So thumbs up for the designer of this concept.
04-04-2014 11:54 AM
After some investigation, I came to following result:
Locks are released on commit or rollback.
So if I want to release an exclusive lock, I have to rollback everything in the current session.
After feeling limited by this design in the first place, I now think, this is a great way to secure my data integrity.
I only want to release an exclusive lock if I don't want to save my data, or if I want to save it 😉
I just have to ensure, all data not belonging to the actual transaction is saved before setting an exclusive lock to another object.
So thumbs up for the designer of this concept.