cancel
Showing results for 
Search instead for 
Did you mean: 

USER should locked automatically

Former Member
0 Kudos

Sir,

My requirement is at 12 o'clock 5 user will lock automatically. Please any idea ???

Thanks in advance...

Nabin

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member188883
Active Contributor
0 Kudos

Hi,

You may write an ABAP program and schedule the same at required time. Relevant table is USR02 and field is UFLAG. Make UFLAG = 128 to lock. Make UFLAG=0 to unlock.

Regards,

Deepak Kori

Former Member
0 Kudos

Thanks Sir,  I am going to talk with ABAP team..

Former Member
0 Kudos

Is there any job from BASIS part ????

former_member188883
Active Contributor
0 Kudos

Hi ,

Basis person can help in scheduling the job.

Regards,

Deepak Kori

Former Member
0 Kudos

Hey,

If you want to do it without involving Abap guys then just create a sql script and include these below commands and schedule it to run using cron. You can modify these commands according to your requirements.

> update <schema-name>.usr02 set uflag=128 where mandt = '<client no>' and bname ='<User-id>';

> commit;

Regards,

Mudasir

Former Member
0 Kudos

Thanks Sir, but confused about CRON.. please claryfi

Former Member
0 Kudos

Hi,

Cron job are used to schedule commands to be executed periodically. You can setup commands or scripts, which will repeatedly run at a set time.

1. To edit crontab  Run command at shell prompt: $ crontab -e

2. Add entries similar to 1 2 3 4 5 /root/backup.sh

Where,

1: Minute (0-59)

2: Hours (0-23)

3: Day (0-31)

4: Month (0-12 [12 == December])

5: Day of the week(0-7 [7 or 0 == sunday])

/path/to/command - Script or command name to schedule

For your example where it needs to run at 1200 hours it will be

0 12 * * *  <location of script>

For more details on cron jobs   you can search on web or refer to the below link

http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/

Hope it helps.

Former Member
0 Kudos

thanks

Former Member
0 Kudos

Sir,

The problem has been solved. Our ABAP team done this job. There is a function call BAPI_USER_LOCK. He did some programme with that and make a t-code zuserlock. And i just schedule that in background at 1.00 AM . Its automatically lock user which i was select with the t-code zuserlock. Thanks once again for your great support... Good day..

Nabin

former_member188883
Active Contributor
0 Kudos

Hi,

Good to know that your problem is resolved. In case you feel that our solution was useful you may reward us relevant points and close this message.

Regards,

Deepak Kori