Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

HR_EMPLOYEE_DEQUEUE not workign in background

Hi All,

I am trying to insert new IT0002 record for employees using HR_INFOTYPE_OPERATION. I am enqueuing the employee before the HR_INFOTYPE_OPERATION and use HR_EMPLOYEE_ENQUEUE after that to release the employee. Now the problem is, it works perfect in foreground in all the modes(N,A,E). But when I sechedule the job in background, the employees are not dequeued. If there are more than one record for the employee, then I get the error "Personnel Number locked by..."

It works fine in background too if make the process to wait by adding WAIT UP TO 1 Seconds but I don't want to do that. Please let me know if there is another option or what is wrong in this process.


Former Member
Former Member replied

Please check if the below code helps in resolving the lock issue.


PERFORM enqueue_pernr(sapfp50g) USING gv_pernr 'S'.
PERFORM dequeue_pernr(sapfp50g) USING gv_pernr.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question