Skip to Content
0
Feb 04, 2011 at 01:00 PM

HR_INFOTYPE_OPERATION -"Personal Number not yet assigned".

282 Views

Hi Experts,

I am facing issues now using the FM HR_INFOTYPE_OPERATION as it returns me the message "Personal Number not yet assigned". I am not sure what I am missing because this is a new hire and am trying to update all the infortypes from a upload file.

LOOP AT gt_tempout INTO wa_tempout WHERE status EQ 'I'.

wa_ip0000-pernr = wa_tempout-pernr.

wa_ip0000-endda = wa_tempout-endda.

wa_ip0000-begda = wa_tempout-begda.

wa_ip0000-massn = wa_tempout-massn.

IF NOT wa_ip0000 IS INITIAL.

CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'

EXPORTING

number = wa_ip0000-pernr

IMPORTING

RETURN = return2

  • LOCKING_USER =

.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0000'

number = wa_ip0000-pernr

  • SUBTYPE =

  • OBJECTID =

  • LOCKINDICATOR =

  • VALIDITYEND =

  • VALIDITYBEGIN =

  • RECORDNUMBER =

record = wa_ip0000

operation = 'INS'

TCLAS = 'A'

DIALOG_MODE = '1'

NOCOMMIT = ''

  • VIEW_IDENTIFIER =

  • SECONDARY_RECORD =

IMPORTING

RETURN = return1

"KEY = key

.

CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'

EXPORTING

number = wa_ip0000-pernr

  • IMPORTING

  • RETURN =

.

  • updated record

IF return2 IS INITIAL.

IF return1 IS INITIAL.

wa_i_udata-pernr = wa_ip0000-pernr.

wa_i_udata-message = c_updated.

APPEND wa_i_udata TO gt_i_udata.

CLEAR wa_i_udata.

ELSE.

wa_i_undata-pernr = wa_ip0000-pernr.

wa_i_undata-message = return1-message.

APPEND wa_i_undata TO gt_i_undata.

ENDIF.

CLEAR wa_i_undata.

ELSE.

  • not updated record - BAPI_ENQUEUE failed - Object locked

wa_i_undata-pernr = wa_ip0000-pernr.

wa_i_undata-message = c_oblck.

"object locked

APPEND wa_i_undata TO gt_i_undata.

ENDIF.

CLEAR wa_i_undata.

"endif.

ENDIF.