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

how to avoid locking transactions?

Former Member
0 Likes
627

hi guys,

how do i avoid locking transactions? upon logging out, transaction is automatically locked under my name... hence preventing others to access the transaction...

how do I avoid locking transaction in my username? thanks!

Rgds,

Mark

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
539

go to sm01 transaction and unlock the transaction.

or 
*         Getting the Lock Status of User
          CALL FUNCTION 'SUSR_USER_LOCKSTATE_GET'
            EXPORTING
              USER_NAME = W_USR02_BNAME
            IMPORTING
              LOCKSTATE = W_LOCKSTATE.
          IF SY-SUBRC <> 0.
          ENDIF.

*         Unlock the user
          IF W_LOCKSTATE-LOCAL_LOCK = 'L'.
            CALL FUNCTION 'BAPI_USER_UNLOCK'
              EXPORTING
                USERNAME = W_USERNAME   "Pass user name to unlock
              TABLES
                RETURN   = T_RETURN.
       ENDIF.

Regards,

Prabhudas


go to sm01 transaction and unlock the transaction.

or 
*         Getting the Lock Status of User
          CALL FUNCTION 'SUSR_USER_LOCKSTATE_GET'
            EXPORTING
              USER_NAME = W_USR02_BNAME
            IMPORTING
              LOCKSTATE = W_LOCKSTATE.
          IF SY-SUBRC <> 0.
          ENDIF.

*         Unlock the user
          IF W_LOCKSTATE-LOCAL_LOCK = 'L'.
            CALL FUNCTION 'BAPI_USER_UNLOCK'
              EXPORTING
                USERNAME = W_USERNAME   "Pass user name to unlock
              TABLES
                RETURN   = T_RETURN.
       ENDIF.

Regards,

Prabhudas

2 REPLIES 2
Read only

Former Member
0 Likes
540

go to sm01 transaction and unlock the transaction.

or 
*         Getting the Lock Status of User
          CALL FUNCTION 'SUSR_USER_LOCKSTATE_GET'
            EXPORTING
              USER_NAME = W_USR02_BNAME
            IMPORTING
              LOCKSTATE = W_LOCKSTATE.
          IF SY-SUBRC <> 0.
          ENDIF.

*         Unlock the user
          IF W_LOCKSTATE-LOCAL_LOCK = 'L'.
            CALL FUNCTION 'BAPI_USER_UNLOCK'
              EXPORTING
                USERNAME = W_USERNAME   "Pass user name to unlock
              TABLES
                RETURN   = T_RETURN.
       ENDIF.

Regards,

Prabhudas

Read only

Former Member
0 Likes
539

Total Posts: 412

Total Questions: 244 (92 unresolved)

Please clean up your old posts.

Rob