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: 

regarding HR_INFOTYPE_OPERATION

Former Member
0 Kudos

Hi All,

I am trying to change the locked OT record by using the FM HR_INFOTYPE_OPERATION.

Its is working fine for unlocked records But not working for locked records.

Is it possible to change the locked records by using this HR_INFOTYPE_OPERATION function module.

Rgds,

Mahesh.

4 REPLIES 4

Former Member
0 Kudos

It should not be possible.

I too would be cross checking it but basic idea says it should not be possible to change any record locked by other person or process.

0 Kudos

You can use FM 'BAPI_EMPLOYEE_ENQUEUE' to see whether the employee is locked, if it is then HR_INFOTYPE_OPERATION will return locked record error and do nothing. The lock will happen if someone is updating the employee (PA30 for example), so it's suposed to do exactly that, prevent others from updating. If you still want to do it, you can try to dequeue the employee, but i'm not sure what will be the consequence (if that is even possible).

Former Member
0 Kudos

The function module BAPI_EMPLOYEE_ENQUEUE locks the tables while the function module BAPI_EMPLOYEE_DEQUEUE unlocks the tables.

So, you can try to check and unlock using function module BAPI_EMPLOYEE_DEQUEUE befor passing the data to function module HR_INFOTYPE_OPERATION.

The lock-unlock mechanism helps in maintaining data consistency such that at a time only one person can access and change the data.

Former Member
0 Kudos

Hi Mahesh,

YES, It is possible to change the locked record.

Make sure that you should pass LOCKINDICATOR = 'X' and also check that NOCOMMIT is initial.

Also make sure that the other key fields you are passing is correct.