2006 Mar 29 12:16 AM
Hello,
Do you know if there is a table that stores the transaction´s name that are running at the time?
Thanks
Gabriel P.
2006 Mar 29 12:21 AM
2006 Mar 29 12:22 AM
or you can also use the TCode STAT to get the local Transaction statistics..
Regards,
Suresh Datti
2006 Mar 29 12:32 AM
SM04 uses a c function to get this data. Here is the logic. This may not be useful as it will not help when user has mulitple sessions.
report zrich_0001 .
data: begin of usr_tabl occurs 10.
include structure uinfo.
data: end of usr_tabl.
data: th_opcode(1) type x.
constants: opcode_list like th_opcode value 2.
refresh usr_tabl.
call 'ThUsrInfo' id 'OPCODE' field opcode_list
id 'TAB' field usr_tabl-*sys*.
sort usr_tabl by mandt bname.
loop at usr_tabl.
write:/ usr_tabl-bname, usr_tabl-tcode.
endloop.
Regards,
Rich Heilman
2007 May 21 7:03 PM
Hi Rich,
My requirement is to retrieve all transaction from multiple sessions. Please
tell how to retrieve this.
Thanks.
With Regards,
Gandhi Subramani
2006 Mar 29 12:22 AM
Hi,
We have a table called TSTC, which stores all the transactions.
Regards,
Sek s
2006 Mar 29 12:24 AM
Hello Rich,
I need to find what transactions are running, becuase I need to lock the tx in case is already running, I tryed with ENQUEUE AND DEQUEUE but it didn´t work. I need to lock tx MIRO.
Thanks,
Gabriel
2006 Mar 29 12:35 AM
2006 Mar 29 12:38 AM
2006 Mar 29 1:30 AM
Hi Rich,
Thanks again for answering, the code you gave me worked, but you r rigth, if the user has several modes, it does´nt work right, I tryed to do it with TX you gave me, but I have no permission to access it, I guess a usual user either.
Do you know any other way to lock the acces to a transaction?
Thanks again,
Gabriel
2006 Mar 29 2:50 AM
Not a big fan of directly updating a database, as I don't someone in another post tonight not too, but in this case if you can't use the SM01, you can do the underlying code, essentially, this is what it is doing. Give it a try.
report zrich_0001 .
data: xtstc type tstc.
parameters: p_lock radiobutton group grp1,
p_unlk radiobutton group grp1.
select single * from tstc into xtstc
where tcode = 'MIRO'.
if p_lock = 'X'.
xtstc-cinfo = '24'. "Lock it
else.
xtstc-cinfo = '04'. "Unlock it
endif.
modify tstc from xtstc.
Regards,
Rich Heilman