cancel
Showing results for 
Search instead for 
Did you mean: 

How to lock multiple users with SAP UME Java api

Former Member
0 Kudos

Hi experts,

Anyone know how to lock and delete multiple users with SAP UME api with single commit?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Anupama,

This is my current solution to lock a single user with a commit but I need solution to lock multiple users with single commit;

Former Member
0 Kudos

Hi ,

For locking i can help you out by below solution:

if you are writing String userId = user.getUniqueName();

IUserAccountFactory uaf = UMFactory.getUserAccountFactory();

IUserAccount ua = uaf.getUserAccountByLogonId(userId);

IUserAccount uma = uaf.getMutableUserAccount(ua.getUniqueID());

IUserFactory uf = UMFactory.getUserFactory();

uma.setLocked(true,0);

uma.save();

uma.commit();

uf.invalidateCacheEntryByLogonId(userId);

-


>>>In your setLock method, try to set IUserAccount.LOCKED_BY_ADMIN

and for deleting ::::::::just check out something on following link ::::::::::::::::::::::::::

http://help.sap.com/saphelp_erp2005vp/helpdata/en/4a/e06f429c789041e10000000a1550b0/frameset.htm

May be it works......

Regards,

Anu

Edited by: Anupama Bindal on May 27, 2008 12:58 PM

Edited by: Anupama Bindal on May 27, 2008 1:07 PM