Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Deleting Lock entries from SM12 programmatically

former_member131833
Participant
0 Likes
9,154

Hi,

I am working in Records management. I want to update the status of the Record in the workflow. But it is not working because the record is open in other session. I found the DEQUEUE_ESDOKOBJ function to unlock my type of object. But there is no effect and the lock is still there.

Can anyone help me on this?

Thanks,

Sivagami R

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,402

hi,

You can use fm

RS_ACCESS_PERMISSION

CALL FUNCTION 'RS_ACCESS_PERMISSION'

EXPORTING

  • AUTHORITY_CHECK = 'X'

  • GLOBAL_LOCK = ' '

  • LANGUAGE_UPD_EXIT = ' '

  • MASTER_LANGUAGE = ' '

MODE = 'FREE'

object ='Your programname"

object_class = ABAP

  • TRDIR_INF =

Hi

we can use this Fm to delete enque Objects

CALL FUNCTION 'ENQUEUE_READ'

EXPORTING

gname = '' """"""""""" ESDOKOBJ ( eg : table name )

garg = '' """""""""""" document name ( eg : trdir )

GUNAME = ''

TABLES

enq = enq

EXCEPTIONS

OTHERS = 0.

DESCRIBE TABLE enq LINES sy-tfill.

CHECK sy-tfill > 0.

CALL FUNCTION 'ENQUE_DELETE'

EXPORTING

suppress_syslog_entry = 'X'

IMPORTING

subrc = rc

TABLES

enq = enq.

5 REPLIES 5
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
3,402

Hi

Use FM : 'DEQUEUE_ALL'.User ID is the parameter for this FM so it will deletes all the lock entries realted to u

Regards,

Sreeram

Read only

0 Likes
3,402

Hi Sreeram,

Thanks for your reply. But the user who has locked will be different from the one who is trying to deleting the lock entry(WF_BATCH in workflow). Also the FM has _SYNCHRON as parameter.

Kindly suggest.

Thanks,

Sivagami R

Read only

Former Member
0 Likes
3,403

hi,

You can use fm

RS_ACCESS_PERMISSION

CALL FUNCTION 'RS_ACCESS_PERMISSION'

EXPORTING

  • AUTHORITY_CHECK = 'X'

  • GLOBAL_LOCK = ' '

  • LANGUAGE_UPD_EXIT = ' '

  • MASTER_LANGUAGE = ' '

MODE = 'FREE'

object ='Your programname"

object_class = ABAP

  • TRDIR_INF =

Read only

0 Likes
3,402

Hi,

I have to delete lock entry for lock object ESDOKOBJ. We have the FM DEQUEUE_ESDOKOBJ. But this is not working.

Can you help on this?

Thanks,

Sivagami R

Read only

3,402

Hi

we can use this Fm to delete enque Objects

CALL FUNCTION 'ENQUEUE_READ'

EXPORTING

gname = '' """"""""""" ESDOKOBJ ( eg : table name )

garg = '' """""""""""" document name ( eg : trdir )

GUNAME = ''

TABLES

enq = enq

EXCEPTIONS

OTHERS = 0.

DESCRIBE TABLE enq LINES sy-tfill.

CHECK sy-tfill > 0.

CALL FUNCTION 'ENQUE_DELETE'

EXPORTING

suppress_syslog_entry = 'X'

IMPORTING

subrc = rc

TABLES

enq = enq.