‎2010 Apr 16 2:26 PM
Is there a function or a table give me the transactions used by a user now?
I need to lock the access to a Z transaction if this is also used...
Thanks
cv
‎2010 Apr 16 3:16 PM
No... I need to know where I can find the data in the "sessions popup" of SM04. I use the function "THUSRINFO" for the user list but I need of the sessions details for knowledge transactions used by users in real time.
Thanks a lot.
‎2010 Apr 16 2:33 PM
Hi,
Use Transaction SM04 to know the Current usage of Transaction for particular user.
You can Use transcation SM01 to lock any transaction.
Regards,
Raghava Channooru
‎2010 Apr 16 2:42 PM
Yes I know, but the problem is I need to know the list of the used transaction in a Z program... I tried to execute SM04 in debug mode but I culd not understand where I can find these data...
‎2010 Apr 16 2:49 PM
Hi Cristiano,
Did you try ST03 - I think it will meet your requirement
Regards,
Raghava Channooru
‎2010 Apr 16 2:54 PM
Hi,
You can try with AUT10 or SM20n
All these are BASIS important tcode.
Hope it helps.
Regards
Arbind
‎2010 Apr 16 3:16 PM
No... I need to know where I can find the data in the "sessions popup" of SM04. I use the function "THUSRINFO" for the user list but I need of the sessions details for knowledge transactions used by users in real time.
Thanks a lot.
‎2010 Apr 16 3:21 PM
TH* is the right area, try calling TH_LONG_USR_INFO for every user in the list.
Thomas
‎2010 Jun 16 9:42 AM
Ciao Sergio Galindo. Non trovo + i tuoi messaggi ma ti rispondo lo stesso.
Ho risolto così...
Fammi sapere se è tutto ok o se hai trovato qualcosa di meglio...
wmode = sy-modno + 1.
CALL FUNCTION 'TERMINAL_ID_GET'
EXPORTING
USERNAME = SY-UNAME
IMPORTING
TERMINAL = wterminal
EXCEPTIONS
MULTIPLE_TERMINAL_ID = 1
NO_TERMINAL_FOUND = 2
OTHERS = 3.
search wterminal for '-'.
if sy-subrc = 0.
wfdpos = sy-fdpos + 1.
wterminal = wterminal+wfdpos.
else.
MESSAGE i001(00) WITH 'Terminale non individuato'.
leave program.
endif.
refresh user_info.
CALL FUNCTION 'TH_LONG_USR_INFO'
EXPORTING
USER = '*'
TABLES
USER_INFO = USER_INFO.
read table user_info with key client = sy-mandt user = sy-uname mode = wmode
terminal = wterminal.
if sy-subrc ne 0.
MESSAGE i001(00) WITH 'Sessione/Modo non individuata'.
leave program.
else.
delete user_info index sy-tabix.
endif.
clear witrused.
loop at user_info where tcode = 'TRANSACTIONCODE'.
add 1 to witrused.
endloop.
if witrused > 0.
MESSAGE e001(00) WITH 'Transazione utilizzata da utente' user_info-user.
leave program.
endif.