Register Login

How to delete users locks automatically.

Updated May 18, 2018

Hi,

This is regarding Lock entries. I checked in my production system sm12.The number of lock entries increased every day so my system becomes very slow then i manually deleted all the lock entries in sm12 then my system working very fast. so example any user working in sap system he proberly not shoutdown the system his lock exist in sm12. i want to delete those users locks automatically. Please tell me how to reslove this issue.

Regards,


Comments

  • 08 Apr 2013 9:54 am rekha
    we can use this Fm to delete user locks automatically.

    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.

×