on 07-14-2011 5:13 PM
Hi All,
The FM gives us the error saying the "Personal number couldn't be locked" ,even thought we are using below FM's
Lock the Pernr
call function 'BAPI_EMPLOYEE_ENQUEUE'
exporting
number = lw_pa0006_92-pernr
importing
return = wa_return.
ls_p0006-pernr = lw_pa0006_92-pernr.
ls_p0006-begda = lw_pa0006_92-begda.
ls_p0006-endda = lw_pa0006_92-endda.
ls_p0006-stras = lw_pa0006_92-stras.
ls_p0006-pstlz = lw_pa0006_92-pstlz.
ls_p0006-ort01 = lw_pa0006_92-ort01.
ls_p0006-land1 = lw_pa0006_92-land1.
call function 'HR_INFOTYPE_OPERATION'
exporting
infty = '0006'
number = ls_p0006-pernr
subtype = '5'
validityend = ls_p0006-endda
validitybegin = ls_p0006-begda
record = ls_p0006
LOCKINDICATOR = 'X'
operation = 'INS'
importing
return = wa_return.
call function 'BAPI_EMPLOYEE_DEQUEUE'
exporting
number = ls_p0006-pernr
importing
return = wa_return.So is there any issue with this code?
We have cross checked but the pernr is not locked by any othere person and there is no entry in SM12
Do any one have idea what could be wrong or is there any other FM to Lock the Pernr.
Regards
CB
When you are using BAPI_EMPLOYEE_DEQUEUE to lock, and then try to unlock it will take longer time to appear as unlock untill the Commit work is done.
This is the standard design behaviour.
Thanks and Kind Regards
Ramana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
If you want to call these BAPI methods, you first have to call the BAPI BAPI_EMPLOYEE_ENQUEUE to lock the employee and afterwards to unlock the employee the BAPI BAPI_EMPLOYEE_DEQUEUE.
The infotype BAPIs don't lock the employee, and you have to do it manually.
Thanks and Kind Regards
Ramana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.