Application Development 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: 

Locking of Transaction

Former Member
0 Kudos

Hi,

I would like to know how to block the parallel usage of any tranaction. If one user is using one tranaction other user should not be able to access that transaction.

Let me know if anyone has a solution to my query.

Kishore

11 REPLIES 11

manohar_kappala2
Contributor
0 Kudos

Hi Kishore,

For what transaction are you speaking of using this?

Because some of the transaction make sure that even though u reach that Tcode u cannot perform the update actions on the same item from two different sessions.

This is achived by locked record (SM12 where u can see the entries which are locked by a user) using enqueue work process.

So you perhaps need not again specifically try to avoid access to that Tcode.

for example

SU01

User A is trying to chaange a USer Record Name1

Then if User B tries to change the same user then he gets a message that he cannot change but can only display.

This is better as some times a person might need to access the Tcode for displaying some information. If this is set up the way you wanted then the other person will have to wait until the previous person comes out of the session.

Hope this helps

Manohar

0 Kudos

Hi,

I need this type of setting for Z type transaction where if one user is using that transaction then other should not be able use that. I need this type of setting for one or two transaction only this not reqiured for entire system.

Looks for your reply.

Regards

Kishore

0 Kudos

You could create a locking object (in se11) and check that when the transaction is started.

I would recommend creating the locking object on a per record basis and not on the transaction as a whole, but it is possible to create a locking object called for example "ZTRANSACTION" and then when a user enters the trx, lock it (view locked objects in sm12) and then when another user enters, check the lock, see that it is locked, give a message and leave the trx.

More information about the locking concept in sap can be found <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/7b/f9813712f7434be10000009b38f8cf/frameset.htm">here</a>.

0 Kudos

Hi

You Can create a role Via T Code PFCG.And Assigned Tcode in this role and assigned this role the user.and this user is access only that t code is assign in this role.

rewards point if helpful

Thanks

Pankaj Kumar

Former Member
0 Kudos

hi ,

i will agree with manohar.

sri

Former Member
0 Kudos

hi ,

For each user assign a role in such a way that if one user uses this transaction(for update pupose),the other should be able to diaplay it.

hope this might help you.

0 Kudos

Well, you cannot really put a hard lock on a TCode - I agree with Dries - If you need to implement the usage tracking of TCodes - you should create a custom TCode and Custom table to log the usage of this custom TCode. when this Custom TCode is used it puts an open entry in the table and when end of program(end of TCode) is met the entry gets closed - in this way you can not only avoid multiple login but also you get the log information.

Thanks

Anands

Former Member
0 Kudos

SCC1 is one of the transaction that allowed only one usage at a time. You can ask a developer to trace the logic on how to achieve it.

Hope this help.

Lye

Former Member
0 Kudos

hi,

try this one.

assign this role to the user.(this user will not be abe to access that transaction).

in s_tcode, we have to define the "from and to" excluding vao1!.

hope this might help you.

Former Member
0 Kudos

Got the answer to my query thanks a lot experts

0 Kudos

hi,

That really good!, so lets know what was is the solution.