Function Module to find 3 months Old Date

Is there any function module to find out 3 months old date for a todays date....Pls Help me......

Hi,
use function module : J_1H_CAL_DATE_IN_INTERVAL
use code as below :
data : date type sy-datum, out_date type sy-datum.
date = '20070702'.
CALL FUNCTION 'J_1H_CAL_DATE_IN_INTERVAL'
  EXPORTING
    date            = date
    days            = '00'
    months          = '03'
   SIGNUM          = '-'
    years           = '00'
IMPORTING
   CALC_DATE       = out_date.
write :/ out_date.
Sandeep Kaushik
Message was edited by:
        Sandeep Kaushik

Similar Messages

  • Function Module to find the Begin Date of the Year

    Hi Experts,
    Could you let me know if there is a FM to find the "Begin Date of the Year".
    I appreciate your help.
    Thanks a lot.

    Hi,
    Do you want the Begin date of the <b>current</b> year..Try this..
    DATA: V_DATE TYPE SY-DATUM.
    V_DATE = SY-DATUM.
    V_DATE+4(4) = '0101'.
    WRITE: / 'Beginning date of the year ' , v_date.
    If you are mentioning about the Fiscal year..Then you can use the FM PERIOD_DAY_DETERMINE
    Thanks,
    Naren

  • Function module for finding differens in date

    HI,
    Friends can any one help me in finding out difference in date in select option .
    i having problem when difference  became negative .My requirement is to find out monthly report for a material . so i need to find out difference of date and need to add one month from the given date to require date.
    Regards,
    Mahendra.

    try the following fms
    SD_DATETIME_DIFFERENCE
    DAYS_BETWEEN_TWO_DATES
    MONTHS_BETWEEN_TWO_DATES..
    sample code is
    REPORT ZDATEDIFF.
    DATA: EDAYS LIKE VTBBEWE-ATAGE,
    EMONTHS LIKE VTBBEWE-ATAGE,
    EYEARS LIKE VTBBEWE-ATAGE.
    PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
    TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
    call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
    exporting
    i_date_from = FROMDATE
    i_date_to = TODATE
    I_FLG_SEPARATE = ' '
    IMPORTING
    E_DAYS = EDAYS
    E_MONTHS = EMONTHS
    E_YEARS = EYEARS.
    WRITE:/ 'Difference in Days ', EDAYS.
    WRITE:/ 'Difference in Months ', EMONTHS.
    WRITE:/ 'Difference in Years ', EYEARS.
    INITIALIZATION.
    FROMDATE = SY-DATUM - 60.
    <u><i><b>DATE DIFF W/O FM</b></i></u>
    LOOP AT itab.
      v_number_of_days = itab-date2 - itab-date1.
      IF v_number_of_days > 1.
        DELETE itab.
      ELSE.
    *-- Do something else.
      ENDIF.
    ENDLOOP.
    regards
    navjot
    REWARD IF HELPFULL
    Message was edited by:
            navjot sharma

  • Function Module to find date by passign the Planning Calendar

    Hi All,
    Can you tell me is there any function Module to find date by passign the Planning Calendar?
    The requirement is i have a planning calender assigned to the Material in the MRP2 view.
    Example: Material XXXXXX is assigned a Planning Calendar Z01.
    Z01 is defined such that Delivery is on Monday only. This calendar says that the material is received from the Vendor only on Mondays.
    So whenever i punch a Sales Order for Material XXXXXX, a PR is automatically geenrated when saving the sales order and the calculation of Delivery dates is also happening at this level.
    Basing on this PR a PO is raised to a Vendor for procuring the Material XXXXXX, now my problem is for example the PO is raised today (30.04.2008), but the Materail XXXXXX is available only on next monday in my plant (05.05.2008) basing on my Planning Calendar assigned in the Materail Master, so i have to inform this dealy to my customer at the time of punching the sales order.
    So is there any function Module to find date by passign the Planning Calendar?
    Thanks for your valuable inputs.
    Regards,
    Sudarshan

    Hi Jorge,
    Thanks for your reply.
    I am unable to open the Function module which you have mentioned below.
    I am working on 4.6 c version of SAP.
    Any ways i have found one function module which is useful to my requirement as stated below:
    DATE_GET_PERIOD
    Thanks and Regards,
    Sudarshan

  • Function module to find out DATA BASE size, free space, used size

    Is there any function module to find out DATA BASE , free space, used size
    FM that gives all the details of the Date base
    what data base, what is the size, free space, used space etc...
    instead of writing case by case for each data base. based on  CASE SY-DBSYS.

    Hi,
    Check this FM:
    DB02_ORA_SELECT_DBA_SEGMENT
    alternatively u can check the tcode: DB02
    thanks|
    Mahesh

  • Function Module to find the Last Execution date of Back ground Job

    Hi,
    Is there any function module to find the <b>last execution date of back ground job</b>.
    So that I can transfer the data from SAP to Legacy system based on the document creation date should be in between last execution date and current date.
    thanks in advance.
    Eswar.

    Don't know of a function module, but you should be able to use the information in table TBTCO to get the last start date and time of the job you are interested in.

  • Function module to find no of days between two dates

    hi everybody i want a function module to find no of days between two dates

    Function module              /SDF/CMO_DATETIME_DIFFERENCE
    Uppercase/Lowercase
    Runtime:        59,629 Microseconds
      Import parameters               Value
      DATE1                           01.01.2007
      TIME1                           00:00:00
      DATE2                           31.12.2007
      TIME2                           00:00:00
      Export parameters               Value
      DATEDIFF                                                    364  TIMEDIFF                                                      0
      EARLIEST                        1

  • Function Module to find out the release value in contract

    Dear All,
    I have to upload the contract with new accoutn assignment without changing the existing contract. For that i have to download all the existing contract data with value.
    In that case i have some issues regarding the value.
    For example : In the system old contract is created with value 1000 and the released value as 500.
    In that case i have to uload the new contract with all the details of existing contract with value of 500 (1000-500=500).
    How can i get the value (500) and from which table.Is there any functional module to find out the release value in contract.
    Thanks and regads,
    PM
    Edited by: PM on Jan 21, 2010 8:40 AM
    Edited by: PM on Jan 22, 2010 9:48 AM

    Hi
    You need to link the table VBFA and VBAK.
    For a contract you can check all the subsequent document (which you can filter whether you want to see Order / delivery / Billing) in VBFA and then from there pick the subsequent document no. and then from VBAK you can pick the Net value of these subsequent documents, and so you will have both the values (value of Contract and value in subsequent document) and you can determine the balance value.
    Regards
    Amitesh Anand

  • Function module to find out the changed values from tables

    What is the standard function module to find out the changed values (the old & new values) from tables in SAP ?

    Hi Harish,
    Please elaborate your requirement...
    Please have a look on CDHDR AND CDPOS tables... it contains changed data... but all chages are not being tracked using it..
    Try Below FMs as well..
    For Header Level...
    CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
        EXPORTING
          date_of_change    = cdhdr-udate
          objectclass       = cdhdr-objectclas
          objectid          = cdhdr-objectid
          time_of_change    = cdhdr-utime
          username          = cdhdr-username
        TABLES
          i_cdhdr           = icdhdr
        EXCEPTIONS
          no_position_found = 1
          OTHERS            = 2.
    For Item Level
    CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
          EXPORTING
            changenumber      = icdhdr-changenr
          IMPORTING
            header            = cdhdr
          TABLES
            editpos           = icdshw
          EXCEPTIONS
            no_position_found = 1
            OTHERS            = 2.
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Function Module for getting the desired date

    Hi All,
    I need a function module where in get the date value from Current date - 540 days.
    i,e System Date - 540 days = ????
    Thanks
    Suresh

    previous FM works good , this is for ur info , to give in month, date and year instead of onlly days
    CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
        EXPORTING
          date      = sy-datum
          months    = '00'
          days      = '07'
          years     = '00'
          signum    = '-'
        IMPORTING
          calc_date = w_due_date.
    Message was edited by: chandrasekhar jagarlamudi
    Message was edited by: chandrasekhar jagarlamudi

  • Function Module for getting Payroll start date and end date

    Hi Gurus,
      If I give one date then is there any function module to find the payroll period start date and enddate for that given date?
    Points will be awarded
    Thanks
    Ravi

    Hi,
      Try these FMs
    HR_PAYROLL_PERIODS_GET
    HR_BEN_PAY_GET_PAYROLL_PERIODS
    HR_PAYROLL_PERIOD_GET
    HR_P06I_GET_PAYROLL_PERIOD
    Regards,
    PRashant

  • Function Module to find the Difference between two times.

    Hi All,
    Wud you plz let me know the Function Module to find the Difference between two times.
    Input Time1( Hours:Minutes) Time2 ( Hours:Minutes)
    Need Output in Hours:Minutes only . ( No seconds Needed )
    Ex :
    Input :
           06:00 to 18:00 Output : 12:00
    and  20:00 to 06:00 Output: 10:00 with +ve sign only. No -ve sign.
    Thanks,
    N.L.Narayana

    check this .
    data : p_timel like sy-uzeit,
           p_timeh like sy-uzeit,
           diff like sy-uzeit,
           di(8) type c .
           p_timel = '200000'.
           p_timeh = '060000'.
           diff = p_timeh - p_timel.
           concatenate diff+0(2) ':' diff+2(2) into di.
           write:/ di.
    also check for this.
           p_timel = '060000'.
           p_timeh = '180000'.
    see if this can be implemented in ur code .
    or else  u can try with  Fm L_TO_TIME_DIFF passing startdate enddate starttime endtime with UOM as MIN
    hope this helps regards,
    vijay

  • Function module to find time difference

    Can any body help me to find the function module to find the time diff: between two times, time is in 24hrs

    Hi again,
    1. Difference is always returned in SECONDS.
    2. use this code (just copy paste in new program)
    REPORT abc.
    data : t1 type sy-uzeit.
    data : t2 type sy-uzeit.
    DATA : DIFF TYPE I.
    t1 = '090000'.
    t2 = '100000'.
    DIFF = T2 - T1.
    WRITE :/ DIFF.
    regards,
    amit m.

  • QM : is there any function module to find inspection lot characterstics

    Hi All,
            is there any function module to find all characterstics for an inspection lot.
    i need exact data which qe51n transaction is fetching .
    thanks in adv ,
    Varma

    Hi uvs,
    1. we can use the fm BAPI_INSPOPER_GETCHAR.
    regards,
    amit m.

  • Function module to find wheather a user is heading any Org unit

    Function module to find wheather a user is heading any Org unit
    Hi Experts,
    I need to know if a user(SY-UNAME) is heading any Org unit(Check box marked for Head of own organisational unit in TCODE PPOMA_CRM for position in Basic Data). Is there any FM for this? I am trying to use FM RH_STRUC_GET but not able to find.
    Any help would be highly appreciated.

    Method  get_assignments_of_user of class cl_crm_ppm_um_toolkit solved this problem.

Maybe you are looking for