cancel
Showing results for 
Search instead for 
Did you mean: 

How to log off users

Former Member
0 Kudos

Hi all,

Is there any solution to log off the 10 CRM users every day at

3 P.M. and will get the access only next day.

Every day will do the same activity ie. log off at 3 P. M.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hello,

May be it will be a solution:

  • you can set parameters rdisp/gui_auto_logout and rdisp/plugin_auto_logout to 1800 (30 minutes)

Note 821539 - Timeout, automatic logout at front end, session terminated

    • write an sql script which will change uflag from 0 to 64 or 128 for these ten users

for example:

update sapsr3.usr02 set uflag=64 where mandt=<client> and bname=<username>;

commit;

      • schedule this script to 02:30

        • now, 10 users will be locked at 02:30

          • if they have an open and idle session, this sessions will be logout after 30 minutes (at 03:00)

But, i want to say, setting parameters rdisp/gui_auto_logout and rdisp/plugin_auto_logout to 1800 will affect all users of your system.

i am thinking for a different method, i know this is not cleverly,

Former Member
0 Kudos

Hi

There is no standard procedure for locking particular set of users automatically as a job, but you can write an ABAP report for the same, setting UFLAG to 128 to lock particular set of users in table USR02 and unlock them by resetting the flag, and scheduling these reports as background jobs.

Hope this helps.

Rahul

Former Member
0 Kudos

>

> There is no standard procedure for locking particular set of users automatically as a job, but you can write an ABAP report for the same, setting UFLAG to 128 to lock particular set of users in table USR02 and unlock them by resetting the flag, and scheduling these reports as background jobs.

> Rahul

You should call function module BAPI_USER_LOCK to do this. You should also first call function module BAPI_USER_GET_DETAIL to ensure that your program does not (for example) lock all your system users accidentally...

former_member1351727
Active Participant
0 Kudos

HI,

If they have already logged in even you lock them they can continue to work until they logoff ..in the next login only they will be getting a message saying that the user is locked.

So I feel first you need to log them off and next is lock them.

(if you want them not work after 3 )

And then unlock them nextday.

I feel you need to trigger a job to do this sequence.

And also if a user is locked then the jobs scheduled by them how do they behave?

As I know if the job starts after the user is locked it will get cancelled.

If the job is in progress when user is locked i do not think it has some implication on that job.

And also you can think some simple cron job for this purpose.

So that that will get triggered at OS level at required time. ( locking unlocking )

Grouping these 10 users in SAP groups may be of some help...however I am not finding options to work on user groups.

Thanks.

Former Member
0 Kudos

I agree with what Julius said.

How can you avoid user logging again once he is logged off?

Locking user would be recommended option wherein you can set the unlock time but how do you do it for only those 10 users is the question.

I guess Scheduling a time triggered job which runs everyday would do that.

Rakesh

Former Member
0 Kudos

Yes,

I want to lock those users every day at 3 PM.

Is there any code or any standard procedure to do that.

Former Member
0 Kudos

>

> Yes,

> I want to lock those users every day at 3 PM.

> Is there any code or any standard procedure to do that.

Do you only want to lock them (to prevent any subsequent new logon attempts, but leave existing sessions open until a new logon attempt is attempted), or do you want also log them off at 3 p.m.?

Please also confirm whether these are dialog users (real people, located between the chair and the keyboard) or system / service users within the system?

Cheers,

Julius

Former Member
0 Kudos

Do you want to log them off and lock them, or only log them off (in which case, how do you stop them from logging on again?)?

Former Member
0 Kudos

are those users can be contacted meaning are they business users or system users?