Skip to Content
author's profile photo Former Member
Former Member

How to get the number of current active external modes?

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2005 at 05: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2005 at 06: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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.