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: 

Regarding time infotype updation

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos
can i update update time infotypes using FM: Hr_infotype_operation

Yes, You can.

0 Kudos

can i update the time related infotypes using Fm Hr_infotype_operation

0 Kudos

Yes, You can update time related infotypes using Fm HR_INFOTYPE_OPERATION.

0 Kudos

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

Former Member
0 Kudos

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 =

.