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

Issue while locing an user using BAPI_USER_LOCK

lrayapat73
Participant
0 Likes
2,000

Hi All,

I am using BAPI_USER_LOCK to lock users, while executing this BAPI for a particular user, if the user account is kept open in SAP GUI client, BAPI is unable to lock the user. Giving following message,

Maintenance of user user1 locked by user adminuser1

I am using SAP .Net Connector(NCo 3.0) SDK to make the calls. Is there any flag we need to set inorder to avoid above behavour.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

MateuszAdamus
Active Contributor
1,769

Hello lrayapat73

It's a standard and correct behavior. Other user is editing the data and has locked the record. That's what this functionality is for.

Kind regards,
Mateusz
3 REPLIES 3
Read only

MateuszAdamus
Active Contributor
1,770

Hello lrayapat73

It's a standard and correct behavior. Other user is editing the data and has locked the record. That's what this functionality is for.

Kind regards,
Mateusz
Read only

jmodaal
Active Contributor
1,769

Hello,

that is the normal behaviour for concurrent accesses on the same data. The "adminuser1" currently maintains this user, therefore your attempt fails due to the lock entry created by the transaction of "adminuser1". The lock entry should be visible in SM12. There is no flag which allows you to bypass this.

Read only

matt
Active Contributor
1,769

I have a program that needs to modify user accounts via BAPI. Where someone is editing an account that my program needs to change, it triggers a workflow to the person locking and their manager that they need to get out as my program is more important than what they're doing.

It also sends a popup message to the admin person's gui session.