Skip to Content
author's profile photo Former Member
Former Member

Comparing Dates in the PY Schema

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!

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Feb 27, 2013 at 05:39 PM

    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 .


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 27, 2013 at 05:47 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.