Application Development and Automation 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: 
Read only

Unlock user via BAPI

Former Member
0 Likes
1,701

Hi,

I want to unlock a user via the BAPI bapi_user_unlock.

This works fine, the user is unlocked.

My next requirement is that I only want to unlock users which are locked automatically by system because the used 3 times the false password.

Is there any way to unlock a user who was locked by system but if the user has been locked by an admin he shouldn´t be unlocked.

Many thanks,

Christoph

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,054

Hello,

In USR02 you have the field UFLAG (User Lock Status). The values for this is:

0	Not Locked
32	Locked Globally By Administrator
64	Locked Locally By Administrator
128	Locked Due To Incorrect Logons (Limited Term)

So may be you check of the lock status is '128' & then unlock the user. Simple !

BR,

Suhas

2 REPLIES 2
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,055

Hello,

In USR02 you have the field UFLAG (User Lock Status). The values for this is:

0	Not Locked
32	Locked Globally By Administrator
64	Locked Locally By Administrator
128	Locked Due To Incorrect Logons (Limited Term)

So may be you check of the lock status is '128' & then unlock the user. Simple !

BR,

Suhas

Read only

Former Member
0 Likes
1,054

Hi,

many thanks for your fast answer!

Christoph