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 error

Former Member
0 Likes
1,622

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

5 REPLIES 5
Read only

Former Member
0 Likes
901

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'

Read only

Former Member
0 Likes
901

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.

Read only

0 Likes
901

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.

Read only

Former Member
0 Likes
901

Sorry, I confused you. When i said action i meant to personnel action, parameter MASSN.

Operation is hardcoded to 'INS'.

Read only

Former Member
0 Likes
901

Was there an answer to this problem???

I'm facing the same problem now...