cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a configuration setting in SAP to unlock a locked transaction automatically.

Former Member
0 Kudos

HI Forum,

This is with regard to unlocking sm12 transaction for a particular user. Is there a configuration setting to unlock the locked transaction for all users.

The main issue is the end users take atleast 2 days to unlock the transactions. Because they need to contact the IT team to unlock in SM12 transaction.

Is there a way to reduce the turnaround time without approaching the IT team to unlock is there some configuration setting in SAP which we can set to unlock automatically or something we can do to reduce the delay of turn around for this lock issue in SM 12 for a particular user.

Thanks in advance

Thanks

Mathew

Accepted Solutions (1)

Accepted Solutions (1)

faisal_pc
Active Contributor
0 Kudos

Hi Mathew,

I was wondering how come a transaction is in locked status for two days?. It should be automatically unlocked after some time as per my understanding. What probably you can do is-I understand users won't have access to SM12- so create a report and assign to a tcode. Give access to the tcode to end users. They can unlock the transactions locked with their user id only. You can do that restriction in the code.

I remember you had asked about how to do sm12 unlock manually in another thread. You can take the same code from there.

Thanks,

Faisal

Former Member
0 Kudos

HI Faisal,

Thanks for your response. Can you please help me how do I restrict the code in deleting only that particular user ids which is locked.

Secondly is there a standard SAP configuration we can set so that locks get released automatically.

Thanks in advance for your help.

Warm Regards,

Mathew

faisal_pc
Active Contributor
0 Kudos

Hi Mathew,

I am not aware whether there are any standard configurations.

In code if you want to restrict the user id, just pass sy-uname as below.

* Data declarations

DATA: enq TYPE TABLE OF seqg3,

            wa_enq TYPE seqg3,

            p_subrc TYPE sy-subrc.

* Call FM to read the locked entries.

CALL FUNCTION 'ENQUEUE_READ'

        EXPORTING

          gname                 = 'CRMD_ORDERADM_H' " U'r table name

          guname                = sy-uname   " User name

        TABLES

          enq                   = enq

        EXCEPTIONS

          communication_failure = 1

          system_failure        = 2

          OTHERS                = 3.

* FM to delete the locked entries.

IF enq IS NOT INITIAL.

   DELETE enq WHERE gmode NE 'E'. " Only edit mode documents.

   CALL FUNCTION 'ENQUE_DELETE'

     EXPORTING

       check_upd_requests = '1'

     IMPORTING

       subrc              = p_subrc

     TABLES

       enq                = enq.

   IF p_subrc = 0.

   ENDIF.


Thanks,

Faisal

Answers (0)