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: 

BAPI: BAPI_EMPLCOMM_CREATE - Employee/applicant is not locked yet

Former Member
0 Kudos

Hello

We are on ECC 6.0, WAS 700.

I am planning to use BAPI - BAPI_EMPLCOMM_CREATE for creating communication details against a personal number (Info type 105).

While I execute this BAPI, I get an error 'Employee/applicant is not locked yet'.

After dubugging, I found that the issue could be in 'ENQUEUE_EPPRELE' of function module 'HR_MAINTAIN_MASTERDATA'.

So in my calling 'Z' program , I called up 'ENQUEUE_EPPRELE' before calling the BAPI and this resulted in success.

However, I don't want to do this because I would expect the BAPI to do all the enqueue and dequeue for me.

Has anyone faced this issue and if yes, possible solutions?

Thanks

KK

1 ACCEPTED SOLUTION

suresh_datti
Active Contributor
0 Kudos

Hi KK,

You have to use BAPI_EMPLOYEE_ENQUEUE & BAPI_EMPLOYEE_DEQUEUE before and after the original BAPI call.

Regards,

Suresh Datti

3 REPLIES 3

suresh_datti
Active Contributor
0 Kudos

Hi KK,

You have to use BAPI_EMPLOYEE_ENQUEUE & BAPI_EMPLOYEE_DEQUEUE before and after the original BAPI call.

Regards,

Suresh Datti

0 Kudos

Suresh-

Thanks for the BAPI. Didn't know I could use one. However, I still feel that the main BAPI should do the enqueue and dequeue by itself unless there is a specific design which I am not aware of. Do you know?

KK

0 Kudos

Hi KK,

Not all BAPIs are designed that way.. some of them need explicit LOCK/UNLOCK & COMMITS too.. You will know only after hitting the error or going through the code...In some rare cases, you cann find such info in the BAPI's Documentation..

Regards,

Suresh Datti