How to calculate retirement date

Dear Guru.
i want to calculate the retirement date.
input for calculating retirement date is employee DOB.
from employee date of birth we need to add 58 years.
any standard function module is there for calculating retirement date.
please help me .

Hello Shail,
You have to write the Dynamic Action in IT0002. So that when IT0002 is maintained, Dynamic action is triggered and IT0041 is created.
1) Let's say, there is a Date Type created for Retirement;  Date Type = R1
2) to calculate the date you have to do following;
FC      N0
S
Variable Function Part
=======================================
06
01
W
P0041-BEGDA=PSPAR-BEGDA
06
02
W
P0041-ENDDA='99991231'
06
03
W
P0041-DAR09='R1'
06
04
F
Get_Retirement_Date(ZHR_DYNROUTINE)
06
05
W
P0041-DAT09=RP50D-DATE1
3) Include "ZHR_DYNROUTINE" need to be created. Within this include a subroutine "Form Get_Retirement_Date.....Endform" need to be created.
4) Inside "Form Get_Retirement_Date.....Endform", you can write your code of the function module to calculate the Retirement date and then pass it in structure RP50D-DATE1;
RP50D-DATE1 = Retirement Date calculated from function
There is another option. You can also develop user exit ZXPADU02. If your hiring action infogroup has IT0041 included, then you can also do this calculation inside the user exit and populate it in IT0041 with correct date type.

Similar Messages

  • How to calculate first date and end date of this year in Query

    Hi Expert
    I want to calculate following dates with inputted date in query.
    I have no knowledge on ABAP and I just can create a query with simple logic.
    Could you teach me how to calculate following date?
    (If inputted date is April 12 2009)
    - First date of this year (Ex January 1 2009)
    - End date  of this year (Ex December 31 2009)
    - First date of last year (Ex January 1 2008)
    - End date of last year  (Ex December 31 2008)
    - First date of this month (Ex April 1 2009)
    Thank you!
    Take

    HR_JP_MONTH_BEGIN_END_DATE   use this FM to get the begin and end date of the Date you are passing. eg when u give input as 04/12/2009, it will return
    04/01/2009 as begin date
    04/30/2009 as end date
    pass the Year in this FM HR_E_GET_FISC_YEAR_DATES, you will get the Fiscal year Begin and End Dates
    Abh

  • How to calculate Deadline Date and Time

    A support desk message has been created and support team has to respond in fixed time duration.
    Creation time of message and duration of response are available.
    How to calculate the exact time and date where this deadline expires using the factory calendar.

    java.util.Date date = java.util.Calendar.getInstance().getTime(); //retrieve a date object
    java.text.SimpleDateFormat df = new java.text.SimpleDateFormat(dd-MMM-yyyy);
    String s = df.format(date); //10-Aug-2001
    String t = "15042001";
    df.applyPattern("ddMMyyyy");
    d = df.parse(t);
    df.applyPattern("dd-MMM-yyyy");
    t = df.format(d); //15-Apr-2001Hey it's Friday, I'm bored

  • How to calculate start date of the week based on week number ?

    i need to get week number of the current date and based on that i need to calculate start date falling in the same week for last year.
    Eg. today is 31st week of year and 31st july date. so what will be the date on the 31st week of last year. i need the start date of that week.
    we can calculate the week number by select to_char(sysdate,'ww') from dual.
    DO we have a single line query for that or will it require writing a pl/sql block ?

    you can try following query
    it can be as inline but for more clean look and create it as select with include select
    with t as
    (select sysdate as dt from dual)
    select to_char(prev_year_dt - to_char(prev_year_dt, 'D') + 1, 'DD.MM.YYYY') as start_of_week from (select
    -- get day from prev year with the same week number
        case
               when to_number(to_char(add_months(dt, -12), 'WW')) > to_number(to_char(dt, 'WW')) then
                dt - (to_number(to_char(add_months(dt, -12), 'WW')) - to_number(to_char(dt, 'WW'))) * 7
               when to_number(to_char(add_months(dt, -12), 'WW')) < to_number(to_char(dt, 'WW')) then
                dt + (to_number(to_char(dt, 'WW')) - to_number(to_char(add_months(dt, -12), 'WW'))) * 7
               else
                add_months(dt, -12)
           end as prev_year_dt
      from t) t1good luck
    Sergii
    'Monday' is not first day of week in 100% ;)
    Edited by: Galbarad on Jul 30, 2012 11:00 PM

  • How to calculate delivery date

    Hello,
    I'm trying to use a formatted search in a Sales Order to calculate the delivery date per row.
    I found the following that could be my answer, but not sure how to proceed:
    DATEADD (datepart, number, date)
    Based on the item information on tab 'Planning' field Lead Time (OITM.LeadTime) I want to calculate the document date plus the Lead Time (or should I create a UDF?).
    I did created the following query:
    DATEADD(day, $[OITM.LeadTime], $[$10.0.DATE])
    When running the query I get the following:
    DATEADD(day, N'', CONVERT(DATETIME, '20080325', 112))
    As you can see it didn't fill the 'number' with the leadtime information (which is 3 in my case).
    And I receive the following error:
    1). [Microsoft][SQL Native Client][SQL Server] Incorrect syntax near 'day'. 2).[Microsoft][SQL Native Client][SQL Server] Statement 'User-Defined Values'(CSHS) (s) could not be prepared.
    How can I my result?
    Regards,
    Petronella

    This seems to work.
    SELECT DATEADD(day, (SELECT LeadTime FROM OITM WHERE ItemCode = $[$38.1.0]), $[$10.0.DATE])
    Regards,
    Douglas

  • How to calculate the data in bex

    Dear all,
                i have a service order no and it current active status  and it time stamp details in my query
    example
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007  
    in my ods i have
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A    17.01.2007  
    800000243      15.01.2009   shahina part pending               x    16.01.2007  
    800000243      15.01.2009   shahina part for asp                 x    17.01.2007  
    i want to calulate the aging of part pending to part despatched
    17.01.2009   -   15-01.2009   = 2 days
    i want to display in my bex like this
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007      2
    ( in bex report i want to display only active status )
    can any one help me please to solve this issue
    Regards
    shahina

    Hi vamsi talluri ,
      i working in crm reports ( service ) here i want to calulate the differance between the old status that is inactive status date to part despathed date
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007  
    in my ods i have
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A    17.01.2007  
    800000243      15.01.2009   shahina part pending               x    16.01.2007  
    800000243      15.01.2009   shahina part for asp                 x    13.01.2007  
    i want to calulate the aging of part pending to part despatched
    17.01.2009   -   13-01.2009   = 4 days
    i want to display in my bex like this
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007      4
    in bex i am dispaying only active satus but i want calculate diff bet active status which i am dispalying in the bex analyzer and old status whaer the data are available in sercice order ods
    please help me how to perform the calculation
    Regards,
    shahina..!
    ( in bex report i want to display only active status )
    can any one help me please to solve this issue
    Regards
    shahina..!
    Edited by: Shahina A on Jan 21, 2009 6:13 AM

  • How to calculate start date and last date for current week

    Dear All.
    i want to calculate the start of the current week as well as the last date of the current week, our week start from Saturday and ends of Friday i.e. Saturday is the first day of the week and Friday is the last day of the week.
    How can i acheive this in universe Designer?.
    Please help...

    Hi
    the formulas in webi will be as follows
    for startdate
    =RelativeDate(LastDayOfWeek(CurrentDate());-8)
    for enddate:
    =RelativeDate(LastDayOfWeek(CurrentDate());-2)
    Regards,
    Ranganath

  • How we calculate the date difference between two list in SharePoint 2010

    Hi friend's....I have two list first is list1. In this list i have two coulmn start_date and End_date. In second list2 i have two column HolidayName and Holiday_date. Now i want two find the number of day in list1 Excluding Weekend and Holiday_date(that
    column from list2). How i will do ..? Please help me dosto..

    Thanks for reply...
    I have done the date difference in list1. But i want to Exclude the Holiday_date form list2.
    I have list1 - Start_date , End_date, Number_of_day(Exclude weekend and Holiday_date between Start_date and End_date )
    list2 - HolidayName, Holiday_date
    Now how i will calculate the Number_of_day in first list.

  • How to Calculate End-Date for a given Startdate in business hours without holidays

    Hello Experts,
    I need to create a plsql function where we need to determine end date for a task. For this, input will be only start date & number of hours allocated for that task. Based on this input we need to exclude Business hours & need to include only Business hours. and in the end we need to achieve the end date after the hour addition to the start date.
    Example : INPUT: 03-OCT-2013 12:00:00 PM /
                                  Hours Allocated 30 Hrs.
    Business Hours - 11 AM to 9 PM.
    So time starts from or Startdate is Friday 03-OCT-2013 12:00:00 PM. 
    So If I want to calculate the end-date by adding 30 hours to it, it should come WednesDay 09-OCT-2013 12:00:00 PM because I excluded Weekends & considered only business hours that is 11 am to 9 pm.
    I am not able to get any such guidance in Internet as most of the docs are having start & end date as input.
    Please help!
    Thanks in advance !!

    Hi,
    As Christ said, there's no nuilt-in Oracle function to tell whether a given DATE is a holiday or not, partially because there's so much local variation in holidays.  You can write a function like that (see http://forums.oracle.com/forums/message.jspa?messageID=3351081 ), but creating a table will be simpler and more efficient.
    I suggest creating a row for every date, whether it's a work day or not; that way, you can have variations in the schedule (e.g., schedule changes and
    partial holidays).
    CREATE TABLE  work_calendar
    (   dt  DATE       PRIMARY KEY
                       CONSTRAINT  work_calendar_dt
                           CHECK (dt = TRUNC (dt))
    ,   day_type       VARCHAR2 (8)  NOT NULL
                       CONSTRAINT  work_calendar_day_type
                           CHECK ( day_type IN ( 'HOLIDAY'
                                               , 'WEEKEND'
                                               , 'WORK DAY'
    ,   start_time     DATE
    ,   end_time       DATE
    ,   work_hours     NUMBER
    ,   work_hours_since_1970     -- or some point earlier than you'll ever need
                       NUMBER
    ,   CONSTRAINT  work_calendar_start_time
            CHECK ( TRUNC (start_time) = dt)
    ,   CONSTRAINT  work_calendar_end_time
            CHECK ( TRUNC (end_time) = dt)
    This will let you do a lot of the calculations you need without a function.

  • How to calculate a date in the future and set it as field value?

    I'm trying to set the value of a read-only field to a date and time 72 hours from the current date and time. Here's how I'm doing it now:
    var futureInMilliseconds = new Date().getTime() + 259200000; // current date and time + 72 hours in milliseconds
    field.value = new Date(futureInMilliseconds);
    The field is formatted as "m/d/yyyy h:MM tt". When I test this in the debugger I see it listing the correct date and time in the future, but the value applied to the field is always the current date and time. So, I'm having a difficult time getting this to work for something that should be fairly straight forward and simple. I'd appreciate any suggestions.

    What is the "field" object?
    What happen when you use "event" for the object and not "field"?
    Even if this script is placed at the document level or any other location, it is still a calculation. It just not a field Custom Calculation Script. You are adding one value to another to get a new value.

  • How to calculate first date of month from a given date in IDT BusinessObjects

    Hello Experts,
    I have a date field in IDT Universe which shows date in this format: Dec 13,2014 12.00.00 PM. Now I want to extract first day and last day of month from this date value. For example: here I want to see Dec 01,2014 12:00:00 PM and Dec 31, 2014 12:00:00 PM in First day of month and Last day of month columns. Also, if database date value is Nov 17, 2014 12:00:00 PM then in first day of month column, it should show Nov 01, 2014 12:00:00 PM and in last day of month it should show Nov 30, 2014 12:00:00 PM.
    I got some google help but 'Date' function is not supported by IDT tool in BusinessObjects.
    Please help.
    Thanks in advance.

    Hi
    Try to use the DB Functions to find out the First and last day. Please find out the below screenshot.
    If DB is BW, you can calculate the First and last day @ BW level use same object in BO directly.
    SQL DB:
    http://docs.oracle.com/html/A95915_01/sqfunc.htm#i1006893
    Oracle DB:
    http://msdn.microsoft.com/en-US/library/ms189794(v=sql.90).aspx

  • How to calculate delivery date of PR

    Dear experts,
    I want to calculate the delivery date of purchase requisition item in the program which is proposed in PR creation. Anyone can give me the function module or subroutine for this?
    Many Thanks,
    Tony.

    Hi,
         It includes "processing time for purchasing + planned delivery time + GR processing time".
    Processing time for purchasing in tcode OPPQ (process time for purchase)
    Planned delivery time in mrp 2 view (Time taken for deliver)
    Goods receipt processing time mrp 2 view.(Inspectoin and Storage)
    Regards,
    Dharma

  • How to calculate a date field

    Hello everyone!  I am creating a form for our clients and i am trying to create an auto fill in field based on the information the client enters in another field but not sure how. 
    Senario:
    Client enters date (ie 01/12/2012) in field 4 and then in Field 6 the calcuation is done and result entered (clients date plus 45 days).  Field 4 I selected date mm/dd/yyyy.  Not sure what to do in properties in field 6 to get end result.
    Any help would be great!

    What is the "field" object?
    What happen when you use "event" for the object and not "field"?
    Even if this script is placed at the document level or any other location, it is still a calculation. It just not a field Custom Calculation Script. You are adding one value to another to get a new value.

  • How to calculate the data as per accounting year

    I want to dispaly the result for  the accounting year from April to March for any accounting year (Accounting year is from April to March).
    I have a table INVOICE.
    CREATE TABLE INVOICE
      IN_NO       NUMBER,
      IN_DT       DATE,
      IN_DETAILS  VARCHAR2(20 BYTE)
    I want to calculate display the result for accounting year from April 2010 to March 2011, and from April 2011 to MArch 2012.
    What statement should i use to filter the data as above ?
    Sanjay

    user12957777 wrote:
    I want to dispaly the result for  the accounting year from April to March for any accounting year (Accounting year is from April to March).
    I have a table INVOICE.
    CREATE TABLE INVOICE
    IN_NO       NUMBER,
    IN_DT       DATE,
    IN_DETAILS  VARCHAR2(20 BYTE)
    I want to calculate display the result for accounting year from April 2010 to March 2011, and from April 2011 to MArch 2012.
    What statement should i use to filter the data as above ?
    Sanjay
    You should learn now to use correct tags
    select to_char(add_months(in_dt,-3),'YYYY') FISCAL_YEAR FROM INVOICE;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to calculate First Date of Posting Period in BEx Query

    Hi,
             I have  2 reporting requirements as follows:
    1) User will either enter a single posting period in a fiscal year or can enter a range of posting periods.
    Based on user selection I need to display three key figures in a report.
    Key figure 1 and Key Figure2 should be the summarized values for each posting period.
    key Figure 3 should be the value on the first date of that particular posting period (in case user selects multiple posting periods i should derive the value of the first date of each posting period).
    2) Also, in another report I need to display only top 8 values  for one key figure in the report.
    Please let me know the method or code required to get this Functionality.
    Thanks in advance.

    First Report
    1. Create Restricted KeyFigure 1 & 2 for the summarized values.
    2. Create a Customer Exit Variable for getting the first date of the posting period, this should be of type Interval. Write code using FM FIRST_DAY_IN_PERIOD_GET to get. Read the selection variable to see the range of posting period and you have to insert that many first dates into this variable.
    3. Create a new Restricted KeyFigure 3 and use the Customer Exit variable created in Step 2
    Second Report
    Use the Top N functionality of BEx and create a workbook. You can set the option Refresh query when the workbook is open so that the data is current when opened.
    Hope this helps.

Maybe you are looking for