‎2009 May 04 8:55 AM
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
‎2009 May 04 9:02 AM
hey i guess for this transaction already it would be having the lock objects existing for that
is it a zobject
cheers
s.janagar
‎2009 May 04 9:07 AM
Hi,
I think using SM01 you can lock the required transaction code.
‎2009 May 04 9:08 AM
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
‎2009 May 04 9:13 AM
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.
‎2009 May 04 9:17 AM
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.
‎2009 May 04 9:31 AM
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