2007 Oct 12 3:48 PM
Hi all.
I'm using FM HR_INFOTYPE_OPERATION to upload data to some infotypes. I'm using BAPI_EMPLOYEE_ENQUEUE before I call the FM, and the BAPI returns no error, which means the employee has been locked, but when I call the FM it returns "Employee/applicant not locked yet". I tried using BAPI_APPLICANT_ENQUEUE instead, but it still didn't work.
any help will be welcome.
thanks in advance,
Hermes.
null
null
2007 Oct 12 3:52 PM
Hi,
use the function module 'BAPI_EMPLOYEE_ENQUEUE' before your function module, and after your function module use 'BAPI_EMPLOYEE_DEQUEUE'
Regards
Sudheer
2007 Oct 12 4:28 PM
I'm using it, but still it's not working. As I said in the first post, although the BAPI_EMPLOYEE_DEQUEUE returns no error the FM HR_INFOTYPE_OPERATION is saying that the employee is not locked...
Message was edited by:
Hermes Alves
2007 Oct 12 5:28 PM
Hi,
In your fm HR_INFOTYPE_OPERATION already system is locking the PERNR
Check for function module HR_MAINTAIN_MASTERDATA within this system locks PERNR
perform enqueue_pernr(sapfp50g)
using pspar-pernr ' '.
then why do you need explicit lock before calling HR_INFOTYPE_OPERATION
a®
2007 Oct 12 7:39 PM
Just to make sure we cover the obvious stuff, make sure that you're passing the same pernr when you call HR_INFOTYPE_OPERATION as when you just called BAPI_EMPLOYEE_ENQUEUE.
- April King
2008 Feb 11 6:49 PM
Hi Hermes,
I have a similar problem. Did you ever resolve this?
Thanks
Shane
2009 Sep 25 7:11 AM
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
number = lv_pa0008-pernr.
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
number = lv_pa0008-pernr.
Use these function modules..They are definitely going to work!
Regards,
Shashank
2009 Sep 25 7:15 AM
try fm:
ENQUEUE_EPPRELE
Edited by: abapuser on Sep 25, 2009 8:17 AM
2014 Dec 03 7:02 AM
I am facing the same problem. Any solution yet??
I used bapi_employee_enqueue and bapi_employee_dequeue, for hr_infotype_operation.
Its working perfect for infotype 0008, but is showing "Employee/applicant is not locked yet" for 0014
2014 Dec 03 7:37 AM
Did you check the return code from the BAPI call. What I do is this:
* Lock Employee
call function 'BAPI_EMPLOYEE_ENQUEUE'
exporting
number = ls_0001-pernr
importing
return = enq_ret.
if enq_ret is not initial.
write:/ ls_0001-pernr, ' ', enq_ret-message.
endif.
then:
call function 'HR_INFOTYPE_OPERATION'
Also, you have marked this question as “assumed answered”. Please then provide what solution worked for you, this way we can all learn on this forum. Thank you.