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

HR_MAINTAIN_MASTERDATA

abdulazeez12
Active Contributor
0 Likes
496

Hii all-

I am using this FM, but not able to see the pdated changes in the info type. The sy-subrc value is 0 in the end. What cud be the reason?

REPORT ZTESTFM.

data: itab like PPROP occurs 0 with header line.

data: it0000 like pa0000 occurs 0 with header line.

itab-INFTY = '0002'.

itab-FNAME = 'GBORT'.

itab-FVAL = 'KARGIL'.

append itab.

CALL FUNCTION 'HR_READ_INFOTYPE'

EXPORTING

TCLAS = 'A'

PERNR = '114'

INFTY = '0000'

BEGDA = '18000101'

ENDDA = '99991231'

  • BYPASS_BUFFER = ' '

  • LEGACY_MODE = ' '

  • IMPORTING

  • SUBRC =

TABLES

INFTY_TAB = it0000

  • EXCEPTIONS

  • INFTY_NOT_FOUND = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'

EXPORTING

PERNR = '114'

MASSN = it0000-massn

ACTIO = 'INS'

TCLAS = 'A'

BEGDA = SY-DATUM

ENDDA = '99991231'

  • OBJPS =

  • SEQNR =

  • SPRPS =

  • SUBTY =

  • WERKS =

  • PERSG =

  • PERSK =

  • PLANS =

  • DIALOG_MODE = '0'

  • LUW_MODE = '1'

  • NO_EXISTENCE_CHECK = ' '

  • NO_ENQUEUE = ' '

  • IMPORTING

  • RETURN =

  • RETURN1 =

  • HR_RETURN =

TABLES

PROPOSED_VALUES = itab

  • MODIFIED_KEYS =

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = ' '

  • IMPORTING

  • RETURN =

.

write: sy-subrc.

2 REPLIES 2
Read only

Former Member
0 Likes
387

pass an empty table to the RETURN tables parameter and read what is the message after the call to the FM. YOu will know what has gone wrong.

Regards,

Ravi

Read only

Former Member
0 Likes
387

hi..

<b>CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'

EXPORTING

pernr = no_emp_int

massn = '01'

actio = 'INS'

tclas = 'A'

begda = sy-datum

endda = '99991231'

  • OBJPS =

  • SEQNR =

  • SPRPS =

  • SUBTY =

werks = '1000'

persg = '1'

persk = 'D9'

  • PLANS =

dialog_mode = '1'

  • LUW_MODE = '1'

no_existence_check = 'X'

  • NO_ENQUEUE = ' '

IMPORTING

return = return

  • RETURN1 =

  • HR_RETURN =

TABLES

proposed_values = it_prop_val

  • MODIFIED_KEYS =</b>if you want the thread url then here are some ....

Hope that this threads itself solves your problem,

<b>Reward points if useful</b>

Regards

Ashu