# How to decide the employee joining date is before or after a Key date

There are many organizations they will have their own rules and regulations, Which all are decided by their HR team and same needs to be mapped in the system but there are cases which emphasis’es that, The rules and regulations are differs on the basis of employee’s joining date.

Here as a consultant our agenda is to determine that whether the employee’s joining date is before or after the key date, Where SAP has given an option to find out it with an operation which HRS=YSXA–. Thanks for providing such operation, Where it fulfill’s many of their clients requirement even i had come across the mentioned scenario in SCN forum from many people so i thought of providing information regarding the same.

Here we see how it works.

Calculation with the fixed date 01/01/2000

There are new regulations for running time accounts in your work contracts from the key date 01/01/2012.

1)The old rules should apply for employees, hired before 01/01/2012.

2)The new rules apply for employees hired after 01/01/2012.

To determine which regulations apply for an individual employee, time evaluation must find out if the employee’s start date is before or after 01/01/2012. As time evaluation can only process duration’s, you should visually reproduce this using the HRS operation.

1)HRS=YSXAMA

2)HRS+4383

3)HRS?0

> Start date before Key date

< Start date after Key date

= Start date equal to Key date

Y = Operator Calculates the length of the period between two dates and displays it in the number field.

S =  Entry date (determined from the Date specification info type  (0041) or the Actions info type (0000)

If SAP R/3 cannot determine the entry date from the date  specification info type (0041), then it takes the information from the actions info type (0000).

For time evaluation for concurrent employment SAP R/3 first tries to determine the entry date from the date specification info type (0041).

Prerequisite for this is that a date type since S=MA.

X = X is fixed date which is (01.01.2000)

A = Measuring unit as “Days”

MA = Date specification from IT0041 (It varies for each individual)

Here the most important value is duration between  Key date and Fixed date in below case it is 4383(01.01.2012 – 01.01.2000 = 4383), We can use Function Module “FIMA_DAYS_AND_MONTHS_AND_YEARS” to find it.

In our example 1, an employee started work on 01/01/2012. The date of evaluation is 02/01/2001.

Date of joining   MA=S     = 01.01.2012

Fixed date                X    = 01.01.2000

Key date – Fixed date      =  01.01.2012 – 01.01.2000 = 4383

1)HRS=YSXAMA    ( 01.01.2000 – 01.01.2012 = -4383 now the HRS value is – 4383 will be calculated by system)

2)HRS+4383          ( (01.01.2000-01.01.2012 = -4383)+(01.01.2012 – 01.01.2000 = 4383)) = “0”

3)HRS?0

=

Start date is Equal to Key date as out put.

In our example 2, an employee started work on 02/01/2012. The date of evaluation is 02/01/2001.

Date of joining   MA=S     = 02.01.2012

Fixed date                X    = 01.01.2000

Key date – Fixed date      =  01.01.2012 – 01.01.2000 = 4383

1)HRS=YSXAMA    ( 01.01.2000 – 02.01.2012 = -4384 now the HRS value is – 4385 will be calculated by system)

2)HRS+4383           ( (01.01.2000-02.01.2012 = -4384)+(01.01.2012 – 01.01.2000 = 4383)) = “-1”

3)HRS?0

<

Start date after Key date as out put.

In our example 3, an employee started work on 31/12/2011. The date of evaluation is 02/01/2001.

Date of joining   MA=S     = 31.12.2011

Fixed date                X    = 01.01.2000

Key date – Fixed date      =  01.01.2012 – 01.01.2000 = 4383

1)HRS=YSXAMA    ( 01.01.2000 – 01.01.2012 = -4382 now the HRS value is – 4385 will be calculated by system)

2)HRS+4383           ( (01.01.2000-02.01.2012 = -4382)+(01.01.2012 – 01.01.2000 = 4383)) = “1”

3)HRS?0

>

Start date before Key date as out put.

I hope this helps to build your own logic for further calculations.

Kindly let me know if you are find any incorrect details so that i can rectify them.

Thanks & Regards

Venkatesh

### Assigned Tags

1 Comment
You must be Logged on to comment or reply to a post.

Hi Venkatesh,

Its good document. but i feel that operation YSXAMA could have explained more clearly. because i never used that operation. so if that explanation is clear. it would be really great for newbies like me.

Other than that, its a very good document and its perfect.

Thanks

Sriram