‎2008 Apr 16 12:28 PM
Hi all!
I am using HR_MAINTAIN_MASTERDATA function module to hire a person but I'm having troubles
at infotype 0001 getting the next error:
PG 220 Start date before initial entry date (00.00.0000)
Looking at the code found where error is raised and CHA_PERNR is empty so not finding any entry
at internal table PS, because there is personnel there.
Personnel number is assigned internal, I'm not passing it to function as external one.
IF CHA_INFTY EQ '0001' AND PSPAR-TCLAS = 'A'. "XFYP30K143284
LOOP AT PS WHERE PERNR EQ CHA_PERNR "XFYP30K143284
AND INFTY EQ INFTY_MEAS "XFYP30K143284
AND BEGDA LE CHA_BEGDA "XFYP30K143284
AND ENDDA GE CHA_BEGDA "XFYP30K143284
AND OPERA NE OPERA-DELETE. "XFYP30K143284
ENDLOOP. "XFYP30K143284
IF SY-SUBRC NE 0. "IT0000 nicht vorhanden "XFYP30K143284
MESSAGE E220 WITH EMPLOYMENT-EINDA. "XFYP30K143284
ENDIF. "XFYP30K143284
ENDIF. "XFYP30K143284
Any idea about the error?
Thank you
‎2008 Apr 16 12:41 PM
are you passing the Action = 'INS'. for creation of new record.
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
PERNR = NUMBER
ACTIO = OPERATION "This Operation should be 'INS'
‎2008 Apr 16 2:48 PM
Yes, I'm passing it. I have been trying with personnel action and it works but passing infotypes without action doesn't. I'm passing all required infotypes as in action are except 0021 and 0015 which are no relevant. I need to do on this way without action.
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
* pernr =
* massn =
* actio = 'INS'
* tclas = 'A'
begda = '20080501'
endda = '99991231'
* objps =
* seqnr =
* sprps =
* subty =
werks = p0001-werks
persg = p0001-persg
persk = p0001-persk
plans = p0001-plans
dialog_mode = '2'
* luw_mode = '1'
no_existence_check = 'X'
no_enqueue = ' '
IMPORTING
return = ls_return
return1 = ls_return1
* hr_return =
tables
proposed_values = lt_pprop
modified_keys = lt_pskey.
‎2008 Apr 16 2:55 PM
How the system knows which action you are performing.
If you pass the Action type 'INS', then system propose pernr automatically or else it will be a problem.
It won't understand what action it is Doing. if you give the Action as INS then it will not go to that check at all.
‎2008 Apr 16 3:19 PM
Sorry, I confused you. When i said action i meant to personnel action, parameter MASSN.
Operation is hardcoded to 'INS'.
‎2008 Oct 15 7:26 AM
Was there an answer to this problem???
I'm facing the same problem now...