Former Member

# Retirement age calculation?

Hello Everyone,

Actually i want to calculate the retirement time left of each employee. Can anyone tell how would i calculate?

Say my field which will have the calculated result will be RAGE and CAGE is the current age of employee.

And say 60 years would be the retirement age and say table will be zemp.

Then i should do something like this:

ZEMP-RAGE = 60 - (ZEMP-CAGE).

But how will i display with exactly months, years and day's left on screen? Please guide.

Thanks for writing back,

Regards,

Lucky

10|10000 characters needed characters exceeded

### Related questions

• Former Member
Posted on Aug 05, 2009 at 05:42 PM

It wouild be much easier if you work with the birthdate rather than the age.

Rob

Edited by: Rob Burbank on Aug 5, 2009 1:44 PM

10|10000 characters needed characters exceeded
• Former Member
Posted on Aug 06, 2009 at 10:29 AM

1) Firstly add 60 years(in your case) to the birth date of the employee using FM--"HR_99S_DATE_PLUS_TIME_UNIT"

This gives you the exact retirement date of the employee, say RDATE

What you want is the time left for his retirement. So,

2) Subtract the current date(sy-datum) FROM RDATE. Use these Fms for that--

FIMA_DAYS_AND_MONTHS_AND_YEARS

FIMA_DECIMAL_MONTHS_AND_YEARS

or /SDF/CMO_DATETIME_DIFFERENCE

So you finally have the time for employee to retire.

Hope this helps,

Regards,

Sumit Nene.

Edited by: Sumit Nene on Aug 6, 2009 12:30 PM

10|10000 characters needed characters exceeded
• Former Member
Posted on Aug 12, 2009 at 05:07 PM

zemp-rdate = 60+zemp-bdate.

Then i thought i should make use of 60 in terms of yyyymmdd form then i tried 00600000 so as to add 60 as an year and nothing as a month or a day. But it hasn't worked it either.

Then i finally calculated it:

365 days in an year Multiplied by 60 years = 21900 and i added that to birthdate and then got the final answer but i haven't excluded leap years yet if i do then it will need some more mathematics into it but that's enough i guess.

Thanks everyone for writing back,

Regards,

Lucky