Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Locking user id from program

Former Member
0 Kudos

Hello folks,

How can we check whther a user id is locked or not.

My program should lock the user id of the employee who has resigned. so first i need to check whether

the id is locked or not. if not i need to lock the id.

Could any body suggest me how can we know whether a id is locked or not. Also, can we use the BAPI,

'BAPI_USER_LOCK' to lock the particular user. Pls advice.

Thanks in advance,

Shyam.

3 REPLIES 3

Former Member
0 Kudos

Hello

For check user lock or not use bapi BAPI_USER_GET_DETAIL

It return structure ISLOCKED (U - not locked, L - locked)

For lock - BAPI_USER_LOCK

For unlock - BAPI_USER_UNLOCK

Former Member
0 Kudos

table field USR02-UFLAG not equal to 0 will tell you if the user is locked.

the bapi BAPI_USER_LOCK can be used, but will act globally, this may be an issue if you are using central user administration

This previous thread describes the issues

Former Member
0 Kudos

Hi,

yes u can use the SAP Standard FM.

It works.

Regards

Arbind