cancel
Showing results for 
Search instead for 
Did you mean: 

Payroll operation: comparison with a certain date

Former Member
0 Kudos

Hello, everybody,

I am trying to compare the employee's date of seniority from IT0041 with a certain date (ex: first of september 2001) so as to calculate my seniority bonus (because the calculation rule is not the same for the employees who have the seniority date before or after entrering the first of september 2001). I have tried to use the payroll function NUM=F... but this gives me only the number of years, or months till the current payroll period, and not the month and year from infotype 0041 and I do not know how to compare the given date and the date coming from the infotype.

please help me

thanks in advance

natachalek

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you very much Renata

Natacha

Former Member
0 Kudos

You can compare the employee's date of seniority from IT0041 with a certain date in a customer operation %xyz (model E7) created in tcode PE04.

The dates from IT0041 are available in an internal table DATUMSANGABE. Develop ABAP code as follows:

  FORM op%xyz.
    DATA: date TYPE d VALUE '20010901'.

    READ TABLE datumsangabe WITH KEY typ = '01'.
    IF datumsangabe-wert LT date.
      vargt = 'X'.
    ELSE.
      vargt = '*'.
    ENDIF.
    PERFORM fillvargt.
  ENDFORM.

In the payroll schema where the seniority bonus is performed, create decision operation %xyz. For the variable key 'X' process the bonus WT for employees hired before 1st Sep 2001 and for others use the branch with variable key '*'.

Regards,

Renata