Skip to Content
-2
Apr 26 at 08:48 PM

how to delete sm12 lock programmatically.

89 Views

Hello,

How to remove lock entry in sm12 transaction programmatically.

Scenario : I

call function 'enqueue_table_sample'. " creating lock in sm12.

if sy-subrc = 0. "no other user locked table_sample

call function 'dequeue_table_sample'. " is removing lock in sm12.

endif.

Scenario : II

call function 'enqueue_table_sample'. " creating lock in sm12.

if sy-subrc = 1. "some user locked table_sample or myself locked table_sample in another session

call function 'dequeue_table_sample'. " is not removing lock in sm12.

endif.

I can able to remove sm12 lock in Scenario I, but i want to remove sm12 lock in case II scenario.

With Regards,

Sunny.