06-07-2005 8:26 AM
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,
06-07-2005 8: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.
06-07-2005 8: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.
06-07-2005 9:15 AM
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