Skip to Content
avatar image
Former Member

Error msg Employee/applicant is not locked yet for BAPI_PERSDATA_CHANGE

Hi all,

I'm testing the BAPI BAPI_PERSDATA_CHANGE in se37. Before that m locking the employee using bapi_employee_enqueue. But while executing the BAPI_PERSDATA_CHANGE m getting the error Employee/applicant is not locked yet. I have used BAPI_TRANSACTION_COMMIT after locking the employee.

I wrote a sample code for changing the personal data. and through the code m able to change the personal data of an employee. But while testing through se37 m getting the error Employee/applicant is not locked yet. Is it not possible to change the personal data just executing the all required bapi's in sequential order: bapi_employee_enqueue ,BAPI_PERSDATA_CHANGE ,BAPI_TRANSACTION_COMMIT

Can anyone help on this. I have exposed these BAPI's for changing the personal data of an employee.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 20, 2011 at 12:24 PM

    Hi ramya,

    Before changing employee personal info, you need to lock the employee id by using function module ENQUEUE_EPPRELE.

    SEQUENTIALLY YOU NEED TO DO THIS.

    call function 'ENQUEUE_EPPRELE'.

    call function 'BAPI_PERSDATA_CHANGE'

    call function 'DEQUEUE_EPPRELE'.

    this will resolves your problem i hope.

    Regards

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 14, 2012 at 08:42 AM

    I've got the same error.

    If I go into debug mode it works fine. It looks like the program is faster then the ENQUEUE_EPPRELE FM.

    I have tried to get a BAPI_COMMIT between the FM's but that doesn't work either.

    This can be fixed with a WAIT UP TO X SECONDS. But thats not an option we want.

    Is there a way to check if the PERNR is blocked in the same program? I've searched the SCN for this without any results.

    Add comment
    10|10000 characters needed characters exceeded