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: 

HR_INFOTYPE_OPERATION -"Personal Number not yet assigned".

jjay
Participant
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

HR_INFOTYPE_OPERATION FM can only be Used with exsisting employees,

to create a new employe use HRPSES40

0 Kudos

HRPSES40?Is tht a function module?

0 Kudos

What FM should I use in order to add new PERID via my program?

0 Kudos

HRPSES40 is a transaction create a new employee usian a call transaction or Batch Input to this transaction use SM35 trasaction to make a Record

0 Kudos

Hi Ortiz,

I tried creating bdc session to copy the PA30 action creating a new employee but somehow when I transfer it to my codes it doesnt seem to work. Are you saying the only way out is via BDC?

0 Kudos

to create a new employee use HRPBSES40 Transaction and complete requiered fields

0 Kudos

Hi Ortiz,

I dont have this transaction available in the sytem, there should be a program assigned to it right?Can I have the programe name if its a standard one or the source code to refer?