Skip to Content
author's profile photo Former Member
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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 06, 2009 at 10:29 AM

    Follow these steps-

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2009 at 05:07 PM

    Actually i have added 21900 instead of addin 60.

    I was adding like

    zemp-rdate = 60+zemp-bdate.

    It was just adding 60 days instead of "years".

    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

    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.