05-26-2009 12:33 PM
Hi all can i update update time infotypes using FM: Hr_infotype_operation.
here i am facing problem with infotype 2001 updation.
with regards
Anand
05-26-2009 12:47 PM
can i update update time infotypes using FM: Hr_infotype_operation
Yes, You can.
05-26-2009 12:49 PM
can i update the time related infotypes using Fm Hr_infotype_operation
05-26-2009 1:07 PM
Yes, You can update time related infotypes using Fm HR_INFOTYPE_OPERATION.
05-26-2009 1:16 PM
Hi anand
Yes u can update the infotype 2001 using HR_INFOTYPE_OPERATION. But actully we will not do that way. Since this infotype 2001 is getting updated through workflow or by t-code PTARQ--> post document. If your system is involved on workflow do not update through HR_INFOTYPE_OPERATION.
Regards
vijay
05-26-2009 1:16 PM
Hi ,
Please go through below coding it ill help you out .
lock the Emp
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = WA_ZHR_TIME-L_PERNR
IMPORTING
RETURN = E_RETURN.
create absence for that day for a perticular emp
CALL FUNCTION 'BAPI_ABSENCE_CREATE'
EXPORTING
EMPLOYEENUMBER = WA-PERNR
VALIDITYBEGIN = WA-begda
VALIDITYEND = WA-endda
START = BEGIN_TIME
END = BEGIN_TIME
ABSENCETYPE = T_ABSENCE-SUBTY
ABSENCEHOURS =
NOCOMMIT =
IMPORTING
RETURN = RETURN
EMPLOYEENUMBER =
SUBTYPE =
OBJECTID =
LOCKINDICATOR =
VALIDITYBEGIN =
VALIDITYEND =
RECORDNUMBER =
.
update the record
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
.