Skip to Content
author's profile photo Former Member
Former Member

How to find back date?

Hi all.

I want eo find back date from surrent date when i pass value of month.

Suppose i pass month value as 20 then i have to find 20 month back date..can anyone tell how to find this..

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Nov 22, 2007 at 10:04 AM

    Hi..

    Use Fm:RP_CALC_DATE_IN_INTERVAL.

    Example..

    CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'

    EXPORTING

    date = input_date

    days = '00'

    months = '20'

    signum = '-'

    years = '00'

    IMPORTING

    calc_date = output_date.

    Message was edited by:

    Vishnu Reddy

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 10:05 AM

    Hi ,

    Use FM HR_PT_ADD_MONTH_TO_DATE.

    Pass values as:

    DMM_DATIN <Date>30.03.2007

    DMM_COUNT 20

    DMM_OPER - (subtract)

    DMM_POS SPACE

    Lokesh

    Message was edited by:

    Lokesh Aggarwal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 10:10 AM

    Hi

    check this code...

    DATA : date1 LIKE sy-datum,
           date2 LIKE sy-datum.
    date1 = sy-datum.
    
    CALL FUNCTION 'MONTH_PLUS_DETERMINE'
      EXPORTING
        months  = '-20'
        olddate = date1
      IMPORTING
        newdate = date2.
    WRITE : date2.
    
    

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 22, 2007 at 10:11 AM

    Hi,

    Try this function module: MONTH_PLUS_DETERMINE

    Regdars

    Adam

    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.