on 04-03-2009 6:53 AM
Hi,
If a user is not using the system for 30 days continiously then his Id/username should be deleted automatically ..How to do this
I would appreciate all your help.
Thanks in advance
Hello,
You will indeed have to create a cusom ABAP program for this. The code to get all users in the current client who have not logged on in the last 30 days would look as follows:
DATA: gt_usr02 TYPE STANDARD TABLE OF usr02,
gw_usr02 LIKE LINE OF gt_usr02.
DATA: refdate TYPE dats.
refdate = sy-datum - 30.
SELECT * FROM usr02 INTO TABLE gt_usr02 WHERE trdat < refdate.
LOOP AT gt_usr02 INTO gw_usr02.
WRITE: / gw_usr02-bname, 'Last logged on:', gw_usr02-trdat DD/MM/YYYY.
ENDLOOP.
Instead of a simple WRITE you can then call a BAPI function to change the user, e.g. BAPI_USER_LOCK or BAPI_USER_DELETE.
30 days looks a bit sharp to actuallly delete users. In a first stage I would simply lock them. Then after a much longer period, e.g. 3 to 6 months, you can delete them.
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
Work with ABAPer, and create a program which run for every 30days.
That should delete the user, which user master data is not getting updated since last 30 days.
Test the same several times as this is critical if you applied directly in PRO.
Regards
Nick Loy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.