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

Locking a trasaction

Former Member
0 Likes
878

hallo

How can I lock a transaction for other users when one user using it. For example va01. Is there any function Module for it.

regards

waseem

6 REPLIES 6
Read only

Former Member
0 Likes
768

hey i guess for this transaction already it would be having the lock objects existing for that

is it a zobject

cheers

s.janagar

Read only

Former Member
0 Likes
768

Hi,

I think using SM01 you can lock the required transaction code.

Read only

Former Member
0 Likes
768

Hi Ahmed,

By default sap locks a transaction when it is open for 1 user. so you don't have to do anything.

At one time a single user can change/edit a tcode.

hope this solves your doubt.

Regards

Suvi

Read only

Former Member
0 Likes
768

Hi,

If one user is using a tcode that is if he is editing or changing the things, then it will be automatically locked for other users for editing/changing, the other users can able to see the tcode in display mode only.

If you want to use the tcode especially for you, then ask concern basis for giving authorizations to the tcode and you can alone only able to use that tcode.

Read only

Former Member
0 Likes
768

As others specified, if it is a standard transaction, then he locking is taken care of already.

If you want to lock your own(Custom transaction).

You have to create lock objects in SE11 transaction.

http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eea5446011d189700000e8322d00/frameset.htm

Then two (ENQUE_your object and DEQUE_your object ) function modules are generated.

You have to use one fm at the start of your transaction and the other at the end.

Read only

former_member222860
Active Contributor
0 Likes
768

Hi,

We can do it through programmatically as well.

Check this code,

tables: tstc.

* To lock the Tcode
update tstc SET cinfo = 'A0'
          WHERE tcode = 'VA01'.

IF sy-subrc = 0.
  COMMIT WORK.
endif.

thanks\

Mahesh