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

Log off all the Users

Hi All,

Is there any program to log off all the users who are currently logged into the system. Using SM04 transaction this can be achieved but I am looking for a report/tcode which will & delete all the users currently logged in at once.

Rgds,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2005 at 07:46 AM

    Hi,

    As far as I know, this is not a desirable operation, even for a super user. Consequently, I don't think there's any report which does that for you. If it is a matter of academic interest then you an set about writing a program of your own.

    But the general practice is to let the users know that they should log off themselves, saving anything important that they may be currently working on. You can choose to send an Express Message to all the logged on users, or you can put up a message on the log on screen which tells the users not to log on during a specified time period for the purpose of some system administation tasks.

    May I ask you why you need a program like that ? May be there's an elegant alternative that you could use.

    Regards,

    Anand Mandalika.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thats a very dangerous option and cannot be encouraged.

      Just for academic interest you can try in these lines to achieve it.

      Define Opcode variables for deletion & commit operations say

      DATA: TH_OPCODE(1) TYPE X

      OPCODE_DELETE LIKE TH_OPCODE VALUE 25,

      OPCODE_COMMIT LIKE TH_OPCODE VALUE 41.

      get the user info using fn. module 'TH_USER_LIST' into a table say <ITAB1>

      then loop through the user list in <ITAB1> and

      CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE_DELETE

      ID 'TID' FIELD <ITAB1-TID>.

      Then commit the work,

      CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE_COMMIT.

      This will delete the sessions.

      You can go through the include program TSKHINCL to get OPCODE details.

      This post is NOT for Notorious programmers 😊

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.