# Regarding Function module HR_MAINTAIN_MASTERDATA.

hi experts,

i have a requirement where in i need to inseert data in to infotype:0000,0001,0105,9010,0041 and update the infotypes:0015,0014,0008,0009 by using function module HR_MAINTAIN_MASTERDATA . i have used ACTIO as 'INS' and 'MOD' (since T589A table doesn't contain the 'UPD' operation).

but using this "MOD' i am unable to update all the infotypes, instead it is throwing the error as entry doesn't exist in T589A for P.

i need to know whether the following code is correct or not and also to overcome the error.. Please let me know the changes needed.

DATA: BEGIN OF IT_INFTY,

INFTY TYPE PPROP-INFTY,

END OF IT_INFTY .

DATA: LV_PERNR TYPE PSPAR-PERNR.

LV_PERNR = '430102'.

if ( IT_INFTY-infty = '0000' or IT_INFTY-infty = '0001'

or IT_INFTY-infty = '9010'

or IT_INFTY-infty = '0105' OR IT_INFTY-infty = '0041' ).

LV_OPERATION = 'INS'.

elseif ( IT_INFTY-infty = '0007' or IT_INFTY-infty = '0008'

or IT_INFTY-infty = '0014' or IT_INFTY-infty = '0015').

LV_OPERATION = 'MOD'.

endif.

CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'

EXPORTING

NUMBER = LV_PERNR "WA_SOURCE_DATA-pernr

IMPORTING

RETURN =

LOCKING_USER = sy-uname

.

*

CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'

EXPORTING

PERNR = LV_PERNR

MASSN =

ACTIO = LV_OPERATION "'INS'

TCLAS = 'A'

BEGDA = SY-DATUM

ENDDA = '99991231'

OBJPS =

SEQNR =

SPRPS =

SUBTY = lv_subty

WERKS =

PERSG =

PERSK =

PLANS =

DIALOG_MODE = '2'

LUW_MODE = '1'

NO_EXISTENCE_CHECK = ' '

NO_ENQUEUE = ' '

IMPORTING

RETURN = RC

RETURN1 = RC1

HR_RETURN =

TABLES

PROPOSED_VALUES = PROPOSED_VALUES

MODIFIED_KEYS =

.

write : / rc-message.

CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'

EXPORTING

NUMBER = LV_PERNR "WA_SOURCE_DATA-pernr

IMPORTING

RETURN =

.

kindly suggest.

regards,

joy.

##### Former Member replied

hi,

as far as what i know, the 'MOD' function of FM HR_MAINTAIN_MASTERDATA does not work as required.

when i had the same requirement, i had used 'DEL' and then 'INS' to achieve the required purpose. thus i had to call HR_MAINTAIN_MASTERDATA two times.