Application Development and Automation 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: 
Read only

Problem while using 'HR_MAINTAIN_MASTERDATA'

Former Member
0 Likes
575

Hi All,

I am trying to create mutliple entries for a cutom infotype which has time constraint as '3'. I need to have multiple records with same pernr, begda and endda and hence using FM HR_MAINTAIN_MASTERDATA with action = COP for all the entries together.

The result is that it creates a record for the first time and then for all other records it treats as 'MOD'. Hence at the end of the update I am left with the last record. Wherein I needed to insert all the records.

Have you ever had this problem before. Can you please help me from where do I start looking at the matter. Its really urgent for me now.

Would reward for the satisfying answer.

My code snippet is as follows:

Loop at lt_p9905 into ls_9905.

  • fill proposed_values for field P9905-begda with l_hirdate.

  • fill proposed_values for field P9905-endda with '99991231'.

  • fill proposed_value for field 'PSYST-PSYST-IOPER' with value 'INS'

  • fill proposed_value for other fields in infty 9905.

endloop.

CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'

EXPORTING

pernr = i_pernr

massn = i_massn

actio = 'COP'

begda = i_begda

endda = i_endda

subty = i_subty

objps = i_objps

sprps = i_sprps

seqnr = i_seqnr

werks = i_werks

plans = i_plans

persg = i_persg

persk = i_persk

dialog_mode = i_dialog_mode

luw_mode = '0'

no_existence_check = i_noexist

IMPORTING

return1 = e_return

TABLES

proposed_values = it_prop

modified_keys = et_key[].

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
422

Set the Action as 'INSS'

1 REPLY 1
Read only

Former Member
0 Likes
424

Set the Action as 'INSS'