Function to go back years

i'm looking for a function module which will go a certain years back,
suppose in the input field  i'll give a date like 06.12.2007 & i want to get 12 years back date,so i'll give 12 in the input field  & i'll have the output 01.12.1995.
thanks in advance........

Hi Sarkar,
Use the FM /SAPHT/DRM_CALC_DATE
For eg:
Import parameters               Value
DATE                            06/12/2007
DAYS                            00
MONTHS                          00
SIGN                            -
YEARS                           12
Export parameters               Value
CALC_DATE                       06/12/1995
Regards
Raj

Similar Messages

  • How to call plsql procedure or function and getting back the string?

    Hi Everyone,
    i am using Jdev 11.1.1.5.0.
    i have a requirement to call plsql procedure or function from my backing bean java file and get back the returned value from the procedure or function.
    what piece of simple code i need to write in my backing bean?
    please suggest.
    Thanks.

    As always you write the method to call he pl/sql in the application module, expose this method to the client (so you see it in the datacontroll) then create a operation binding to the method and call this operation from the bean. The result you get by operation.getResult();
    You should never call pl/sql from the bean directly!
    The doc shows how to call the procedure from an application module: http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcadvgen.htm#sm0297
    Timo

  • Call a Function From a Backing Bean

    Hello,
    I am trying to call a PL/SQL function from a Backing Bean but i am getting a getDBTransaction error. Here is the example i was trying to do in a backing bean.
    I Am getting the employee ID , sending it to a function that calculates the annual salary and then through a button whose code is in the backing bean, showing a message on the screen with the annual salary.
    I am getting the JBO-25301 error.
    Can't i use getDBTransaction in my backing bean.

    Please have a look at the following thread:
    Stored Procedure

  • What is the function module to calculate "years of services" in HR?

    What is the function module to calculate "years of services" in HR?

    hi ,
    following function module will help you to find the years of service
    CALL FUNCTION 'HR_HK_TOTAL_YOS' "HR-HK: Calculate an employee's total years of service
      EXPORTING
        years1 =                    " pea_scryy     Years of service
        months1 =                   " pea_scrmm     Months of service
        days1 =                     " pea_scrdd     Days of service
        years2 =                    " pea_scryy     Credit years of service
        months2 =                   " pea_scrmm     Credit months of service
        days2 =                     " pea_scrdd     Credit days of service
      output_format = '01'        " char2         Format to display the output
      IMPORTING
        years =                     " pea_scryy     Total years of service
        months =                    " pea_scrmm     Total months of service
        days =                      " pea_scrdd     Total days of service
        .  "  HR_HK_TOTAL_YOS
    thanks u..

  • How to implement a back functionally like the back of the browser

    Hi, I have a commandImageLink("go back") in a template jspx. How to implement the back functionally like the back of the browser with a managed bean method??. For know I m not using task flows.

    I think you can use a javascript method to go back to the previous browser page.
    http://javascript.about.com/library/blback.htm
    http://www.pageresource.com/jscript/jhist.htm
    http://www.w3schools.com/jsref/met_his_back.asp
    Perhaps you find something useful and related to backing beans here:
    http://adfdevelopers.blogspot.com/2009/04/some-handy-code-for-backing-beans-adf.html
    NA
    http://nickaiva.blogspot.com

  • Current date to back years finacial dates

    Hi,
    I am looking a salution for current year motnh to back years financial month.
    If current month is April 2009 I want to go bakc finacial year 2008 which is always be june(Financial Month).
    sysdate - saydate finincalil month and year

    It is always go back to JUN the year can be any year. For example I want to go back to JUN 2003 and current year 2009 and April is the month so from April to JUN 2003.
    But mostly for 2008

  • Date function to pull back dates of the year?

    is there a built in function for returning all dates (whatever format) between to dates ?
    Example:
    Select functionname('2009/06/01', 'yyyy/mm/dd), ('2009/06/05', 'yyyy/mm/dd')
    from dual
    Wanted results
    2009/06/02
    2009/06/03
    2009/06/04

    Hi,
    user11210446 wrote:
    Here is what I'm trying to do,
    There is a start date and an end date. I have US holidays for current year in a table so for example christmas 12/25/2009
    I want to show dates between the start date and end date, and if there is a holiday on that date it will not show.
    make sense
    so if a user puts 12/23/2009 for start and 12/29/2009
    it would show
    12/24/2009
    12/26/2009
    12/27/2009
    12/28/2009Yes, that's very clear.
    I would actually do that with a NOT IN sub-query
    SELECT  TO_DATE ('&start_date', 'MM/DD/YYYY') + LEVEL - 1
    FROM     dual
    WHERE   TO_DATE ('&start_date', 'MM/DD/YYYY') + LEVEL - 1 NOT IN
            SELECT  appropriate_column
            FROM    holiday
    CONNECT BY LEVEL <= 1 + (TO_DATE ('&end_date', 'MM/DD/YYYY') - TO_DATE ('&start_date', 'MM/DD/YYYY'));where &start_date and &end_date are substitution variables in MM/DD/YYYY format. You could use bind variables just as well.
    This assumes the DATEs in holdiay are all midnight. If not, use TRUNC (appropriate_column).
    Edited by: Frank Kulash on Jun 4, 2009 12:59 PM
    There's nothing like clicking that "Save" button to give you better ideas!
    MINUS is a little simpler than NOT IN:
    SELECT  TO_DATE ('&start_date', 'MM/DD/YYYY') + LEVEL - 1
    FROM     dual
    CONNECT BY LEVEL <= 1 + (TO_DATE ('&end_date', 'MM/DD/YYYY') - TO_DATE ('&start_date', 'MM/DD/YYYY'));
    MINUS
    SELECT  appropriate_column     -- or TRUNC (appropriate_column)
    FROM    holiday
    ORDER BY 1;

  • Zipeg and limewire no longer functioning (both bounced back).

    Greetings,
    Zipeg and limewire are no longer functioning on my mac (limewire first, about 3 weeks ago). In fact, i've tried to re-downloaded both softwares but the applications will only bounce back and not functioning. Previously (2 months ago), i have a same problem with MacDJView. Any idea what's wrong with my mac?
    Any help will be greatly appreciated. Thanks!!

    Hello n_n:
    Some programs will not run if they are located outside of the "/Applications" directory on the
    boot volume. I have Zipeg, but I don't have the other programs you use, so I don't know
    if they will run on your second partition. My Zipeg install is on my boot drive, I've never
    tried to run it on my data partition. I, like you, do have programs located on a second partition,
    and every now and then I try to install one there and it will refuse to run, if it does refuse to run,
    I go ahead and install it on the boot volume, however the majority of apps don't care where they
    are installed.
    Did you just install these apps or have they been working and just decided to quit?
    Kj

  • Function  module for current year

    Hi ,
    Is there any function module which will give current year only ??
    Regards
    rahul

    data : a(20).
    <b>CALL FUNCTION 'GM_GET_FISCAL_YEAR'</b>
    EXPORTING
    I_DATE = SY-DATUM
    i_fyv = 'V3'
    IMPORTING
    E_FY = a.
    EXCEPTIONS
    FISCAL_YEAR_DOES_NOT_EXIST = 1
    NOT_DEFINED_FOR_DATE = 2
    OTHERS = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    write : a.

  • Function module for fiscal year

    Hi all,
    can you please suggest me the function module for automatic generation of fiscal year.
    Thanks and regards,
    S.Latha.

    Hi Latha,
    Please find below the code for auto generation of the fiscal year.
      l_date = sy-datum.       "l_date should declared of type sy-datum
    Use the function module to get the period
          CALL FUNCTION 'MC_PERIODE_ZUM_DATUM'
               EXPORTING
                    idate        = l_date
                    iperkz      = l_p         " 'P'
                    iperiv       = l_periv   "V6
               IMPORTING
                    eperid       = l_period
               EXCEPTIONS
                    wrong_period = 1
                    OTHERS       = 2.
    l_fiscal = l_period+0(4).
    l_p - 'P'   i. e. Is the period indicator (Period according to fiscal year variant)
    l_periv - 'V6'  i.e. Is the Fiscal year variant. Here it is V6 which relates country 'US'.
    l_period - gives you the Fiscal period.
    l_fiscal -  The first four digits of l_period gives you the 'Fiscal year'.
    Hope this helps you !.
    Thanks & Regards,
    MM Jaffer.
    Edited by: MohammedJaffer on Aug 10, 2010 12:53 PM

  • Function CALCULATE_DATE and  leap year

    Hi,
    I need to substract some months from a date. I tried to use the standard function CALCULATE_DATE but it has a proble with leap years. If I execute it with the following parameters:
    CALL FUNCTION 'CALCULATE_DATE'
         EXPORTING
              days        = '0'
              months      = '-24'
              start_date  = '20080229'
         IMPORTING
              result_date = X.
    The value that I get in X is '00000000' because 2006 isn't a leap year. The problem is that the function doesn't know how to deal with this. The solution is very easy, buy if it's possible I would like to use a standard function.
    Do you know if there are any standard function that has no problems with leap years?
    Thanks and kind regards,
    Marcela.

    Hi Marcela,
    Welcome to SDN.
    You can try this FM <b>RP_CALC_DATE_IN_INTERVAL</b>.
    data: wa_date like sy-datum.
    call function 'RP_CALC_DATE_IN_INTERVAL'
             exporting
                  date      = '20080229'
                  days      = 0
                  months    = 24
                  signum    = '-'
                  years     = 0
             importing
                  calc_date = wa_date.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Ago function with full past year

    I want to create an ago function. But if the ago function is for the full past year and not only for the same current period.
    Example:
    Period ||YEAR || Amount
    1 || 2008 || 10
    2 || 2008 || 10
    3 || 2008 || 10
    4 || 2008 || 10
    5 || 2008 || 10
    6 || 2008 || 10
    7 || 2008 || 10
    8 || 2008 || 10
    9 || 2008 || 10
    10 || 2008 || 10
    11 || 2008 || 10
    12 || 2008 || 10
    1 || 2009 || 5
    2 || 2009 || 5
    3 || 2009 || 5
    4 || 2009 || 5
    Report for year 2009 period 4 should be
    YEAR || TODATE || AGO
    2009 || 20 || *120*
    Does somebody has a solution for the result 120, Thanks

    Hi Jim,
    In your BMM layer create a duplicate column for the amount and name it as ago.
    double click that and make the source expression as AGO(amount, year,-1) like that.. i dont remember the exact synatx. but the point is give the column name for which year ago value needs to be calculated, parameter to be taken into account eg year or month or week and no. of year or month.
    and in the aggregate column use sum.
    use this column in your report it will give 120.
    if it doesn't work please tell us.
    Thanks,
    karthick

  • Finding a function to get leap year

    Hi everybody!
    I need a function or code to find  if a year is  leap year or normal year.
    Thanks a lot of!
    DM

    Here is some code that I had in my bag of tricks.
    report zrich_0001 .
    parameters: p_datum type  sy-datum.
    * check if it is a leap year.
    data: march1 type sy-datum.
    data: last_day_feb type sy-datum.
    march1 = p_datum.
    march1+4(4) = '0301'.
    last_day_feb = march1 - 1.
    if last_day_feb+6(2) = '29'.
    write:/ 'This is a leap year'.
    endif.
    Regards,
    Rich Heilman

  • Take back Year End Closing for Fixed Asset

    Dear all,
    Is it possible to reverse a year-end closing in Fixed Asset? If yes, how to do it and what are the consequences?
    Users need to carry out some corrections for the closed year!
    Thanks for your help.
    Nas.

    Hi.
    Thanks for answering. If I change it in trans. OAAQ manually, should I re-run depreciation run before running the closing transaction AJAB again?
    Thanks,
    Nas

  • Function to go back to older version of an object.

    Hello my friends,
    I would like to know how can I retreive my function to an older
    version. I know how I can do it manualy using the version managment but I want to know if there is a way to do it using
    some sord of function or program.
    Thanks in advance,
    Eitan Illuz.

    Dear Friend,
    I will give you step by step how to do this.
    Prerequisite is the object should be managed by Version management.
    Step1:
       Example you have 3 versions in Version database and you want to retrieve one version.
       Get the version number which you want.
    Step 2.
       In a type1 program ,By calling this function module SVRS_GET_VERSION_REPS with object name and version as export parameter.
       The result/source code text will be in internal table, process the internal table and write this into a file.
    Step 3.
      Using the internal table trdir_tab for the other object attributes like type,version,prg name etc.
    Hope this solves your problem.
    regards
    ravisankar

Maybe you are looking for

  • Firefox will not update after installing new version

    I have repeatedly updated Firefox (both by updating and by uninstalling completely and re-installing a fresh copy of the latest version) and when I go to HELP > ABOUT FIREFOX it shows I have version 6.0.2 BUT SEVERAL sites (including Mozilla.com) giv

  • How to have Secure Connection for File Adapter.Pls help

    Hi All, For File to File Scenario How to have Secure Connection for File Adapter. Pls send links/blogs explaining this scenario. Regards

  • ACR colour temperature changes not honoured

    Using Win7 64bit, CS6 perpetual with xmp files as sidecars, I have made droplets that will open a nef file and run various processes before saving the file. I have recently seen an issue where the droplet will not honour any colour temperature change

  • Adding actions to Illustrator

    I'm trying to add "masking actions" to Illustrator but it won't copy. I'm using the 30-day trial version of illustrator. Could that me why I'm not able to add actions?

  • How to Cancel the integration process(ccBPM) after a specifice period

    Dear Experts, I have a ccBPM(integration process) having two receive steps using one correlation, 1. First receive step receives the Delivery IDOC 2. Second receive step receives the Invoice IDOC of the corrospondng delivery of the first receive step