04-24-2012 10:18 PM
Hello,
I have a requirement in which i need to lock the employee record for IT2001 by setting P2001-sprps as 'X'.That is, initially when a record is created
Then after few approvals, i need to read the same record from infotype 2001 and need to modify the lock indicator with blank(unlock)
Can the same requirement be achieved using HR_INFOTYPE_OPERATION ?
I tried using HR_INFOTYPE_OPERATION but the employee record is not unlocking.Please suggest.
04-25-2012 10:20 AM
Hello,
To unlock a locked infotype record you use HR_INFOTYPE_OPERATION with LOCKINDICATOR = 'X' and
OPERATION = 'EDQ'.
Regards,
Sergey Korolev
04-25-2012 5:38 PM
Hi,
I have coded as per your suggestion but I am getting an error
"A complex application error has occurred"
04-25-2012 5:47 PM
Such an error can occur when you call HR_INFOTYPE_OPERATION from within some HR user exit or BADI within standard infotype logic (say in transaction PA30). Alternatively if your functionality is to be called within standard PA30 you can employ infotype dynamic actions (table T588Z).
04-25-2012 11:16 AM
Hello Neetu,
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0006'
NUMBER = sp2001-pernr
SUBTYPE = sp2001-subty
* OBJECTID =
LOCKINDICATOR = 'X'
VALIDITYEND = sp2001-endda
VALIDITYBEGIN = sp2001-begda
* RECORDNUMBER =
RECORD = sp2001
OPERATION = CHANGE
* TCLAS = 'A'
* DIALOG_MODE = '0'
NOCOMMIT = 'X'
* VIEW_IDENTIFIER =
* SECONDARY_RECORD =
IMPORTING
RETURN = retcd .
if sy-subrc = 0.
commit work.
endif.
Regards,
Sujeet Mishra
04-25-2012 5:38 PM
Hi,
I have coded as per your suggestion but I am getting an error
"A complex application error has occurred"
05-06-2020 7:04 PM
Hi,
Did you get solution to unlock employee record. I am also required same functionality.
Please suggest if you have any solution.
Thanks,
Brahma