cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing Dates in the PY Schema

Former Member
0 Kudos

I am trying to write a rule to decide if a wage type should be created (or not).  This wage type will determine if the employee is allowed to make 401k contributions (it is not controlled by a benefit plan).  The requirement is as follows: If an employee terminates in the previous calendar year, they are only allowed to contribute to their 401K plan in the new year if the payment falls within 2 ½ months (determined to be 77 days) of their termination date.  If the payment date falls within the same year as termination date then contributions are allowed.

I need some help writing the rule please.  Is there a way to do a date comparison inside the payroll schema?  I'm thinking of something like this but I'm not sure if I'm approaching it the right way:

Termination Date (field Z6 on IT0041) = mm1/dd1/yyyy1.

Termination Date + 77 days = mm2/dd2/yyyy2.

If yyyy2 = yyyy1 then True  (it's okay to make contribution)

If yyyy2 > yyyy1 and payment date > mm2/dd2/yyyy2 then False  (don't make the contribution)

I appreciate your help!

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member298958
Participant
0 Kudos

Hi,

If you have a termination date in infotype 41, you can compare the two date using for example NUM=FXXT where XX = the date type + 77  to be compare with NUM=FZ6T.

Also, read the documentation on the F parameter with num/amt you can use num=fa for infotype 0.

Check also the operation table using aper where you can retrieve payroll dates.

I would also check if a custom operation can be created to do all of this and return the proper flag to do your process.

Hope this help!

Frederick

former_member193210
Active Contributor
0 Kudos

You can use operation NUM (or RTE, or AMT) to establish the number of days between a date related to this pay and the date on IT0041, as in the operation sequence NUM=FnnT NUM?77 .