07-31-2005 4:34 PM
hi all,
I need to get the number of currently active external modes. This can be done by calling function THUSRINFO. But this only works propperly, if you are logged on only once. If you are logged on more than one time then the function returns several entries in the parameter USR_TABLE. The entries mainly differ in the first parameter TID (type UTID, INT4) "terminal-identification" but how can I know which is the valid one for my current session. Functions TERMINAL_ID_GET, SPH_TERMINAL_IDENTIFY and SPH_TERMINAL_ID_GET dont work.
Or is there another way to get the number of active external sessions?
Thanks in advance,
Michael
08-01-2005 6:19 AM
Hi Michael,
just go to the command box and type in <b>/o</b>. You can also use the transaction SM04 to get the required information. I think this question has been touched upon sometime in the past. Please search this forum and you may find some information and pointers.
Regards,
Anand Mandalika.
08-01-2005 7:50 AM
Hi,
tables: usr02, usr41.
data: OPCODE_MODE_COUNT(1) TYPE X VALUE 3,
modes like sy-index,
u_MODES LIKE MODES.
select * from usr02.
select * from usr41 where BNAME = usr02-bname.
CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE_MODE_COUNT
ID 'TID' FIELD usr41-TERMID
ID 'MODES' FIELD MODES.
IF SY-SUBRC = 0.
u_MODES = u_MODES + MODES.
ENDIF.
endselect.
if sy-subrc = 0.
write:/ usr02-bname, u_MODES.
endif.
clear u_modes.
endselect.
08-01-2005 9:14 AM
hi,
your answer is not exactly what I need, because it won't work if I'm logged on more than once at the same time. But its a good info on using CALL 'ThUsrInfo'.
In the meantime i found the solution in
call function 'TH_USER_INFO'
importing
act_sessions = lv_act_sessions
max_sessions = lv_max_sessions
. " one more free session?
thanks again,
Michael