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

HR_INFOTYPE_OPERATION error

Former Member
0 Likes
1,443

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

9 REPLIES 9
Read only

Former Member
0 Likes
1,057

Hi,

use the function module 'BAPI_EMPLOYEE_ENQUEUE' before your function module, and after your function module use 'BAPI_EMPLOYEE_DEQUEUE'

Regards

Sudheer

Read only

0 Likes
1,057

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

Read only

0 Likes
1,057

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

Read only

Former Member
0 Likes
1,057

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

Read only

Former Member
0 Likes
1,057

Hi Hermes,

I have a similar problem. Did you ever resolve this?

Thanks

Shane

Read only

Former Member
0 Likes
1,057

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

Read only

former_member188827
Active Contributor
0 Likes
1,057

try fm:

ENQUEUE_EPPRELE

Edited by: abapuser on Sep 25, 2009 8:17 AM

Read only

Former Member
0 Likes
1,057

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

Read only

former_member201275
Active Contributor
0 Likes
1,057

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.