Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

function module by which i can change infotype 2002.

Hello all,

Please suggest me function module by which i can change infotype 2002.

i have used code below.

CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'

EXPORTING

NUMBER = empid.

WA_P2002-PERNR = empid.

WA_P2002-INFTY = C_2002.

  • WA_P2002-SUBTY = wa_it1-subty.

WA_P2002-BEGDA = wa_it1-STARTDATE.

WA_P2002-ENDDA = wa_it1-ENDDATE.

WA_P2002-BEGUZ = wa_it1-ARRTIME.

WA_P2002-ENDUZ = wa_it1-DEPTIME.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

INFTY = C_2002

  • SUBTYPE = wa_it1-subty

NUMBER = empid

RECORD = WA_P2002

OPERATION = 'INSS'

  • NOCOMMIT = 'X'

IMPORTING

RETURN = RETURN.

if sy-subrc = 0.

APPEND wa_it1 TO temp.

ENDIF.

CLEAR: WA_P2002.

call function 'BAPI_TRANSACTION_COMMIT'.

CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'

EXPORTING

NUMBER = empid.

i don't wanna change subtype.

i only want to change values of begruz and endruz.

Means only time details of employee.

Regards,

Purvesh.

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question