Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem creating new employee with HR_MAINTAIN_MASTERDATA

Hello,

This is my first attempt in ABAP, but I get the following error and have no idea why:

PG220 Start date before initial entry date (00.00.0000)

Can anyone help?

This is my code:

DATA: t_prop LIKE PPROP OCCURS 0 with header line.
DATA: RC TYPE BAPIRETURN.
DATA: RC1 TYPE BAPIRETURN1.
DATA: RC1a TYPE BAPIRETURN1.
DATA: hr_ret TYPE HRHRMM_MSG.
DATA: p0000 like pa0000 OCCURS 0 with header line.

t_prop-INFTY   = '0000'.
t_prop-FNAME   = 'P0000-BEGDA'.
t_prop-FVAL    = BEGDA.
t_prop-SEQNR   = '00'.
append t_prop.

t_prop-INFTY   = '0000'.
t_prop-FNAME   = 'P0000-ENDDA'.
t_prop-FVAL    = ENDDA.
t_prop-SEQNR   = '00'.
append t_prop.

t_prop-INFTY   = '0000'.
t_prop-FNAME   = 'P0000-MASSN'.
t_prop-FVAL    = '01'.
t_prop-SEQNR   = '00'.
append t_prop.

t_prop-INFTY   = '0000'.
t_prop-FNAME   = 'P0000-MASSG'.
t_prop-FVAL    = '01'.
t_prop-SEQNR   = '00'.
append t_prop.

t_prop-INFTY   = '0001'.
t_prop-FNAME   = 'P0001-PERSG'.
t_prop-FVAL    = PERSG.
t_prop-SEQNR   = '00'.
append t_prop.

t_prop-INFTY   = '0001'.
t_prop-FNAME   = 'P0001-PERSK'.
t_prop-FVAL    = PERSK.
t_prop-SEQNR   = '00'.
append t_prop.

t_prop-INFTY   = '0001'.
t_prop-FNAME   = 'P0001-BUKRS'.
t_prop-FVAL    = BUKRS.
t_prop-SEQNR   = '00'.
append t_prop.

t_prop-INFTY   = '0001'.
t_prop-FNAME   = 'P0001-WERKS'.
t_prop-FVAL    = WERKS.
t_prop-SEQNR   = '00'.
append t_prop.

t_prop-INFTY   = '0001'.
t_prop-FNAME   = 'P0001-BTRTL'.
t_prop-FVAL    = BTRTL.
t_prop-SEQNR   = '00'.
append t_prop.

t_prop-INFTY   = '0002'.
t_prop-FNAME   = 'P0002-NACHN'.
t_prop-FVAL    = NACHN.
t_prop-SEQNR   = '00'.
append t_prop.

t_prop-INFTY   = '0002'.
t_prop-FNAME   = 'P0002-VORNA'.
t_prop-FVAL    = VORNA.
t_prop-SEQNR   = '00'.
append t_prop.

*inserting data
*--------------
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
  EXPORTING
*    PERNR = '00000000'
    ACTIO = 'INS'
    DIALOG_MODE = '1'
    NO_EXISTENCE_CHECK = 'X'
  IMPORTING
    RETURN = RC
    RETURN1 = RC1a
    HR_RETURN = hr_ret
  TABLES
    PROPOSED_VALUES = t_prop.

Not what you were looking for? View more on this topic or Ask a question