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

calculate 6 months prior

Hello,

I have a date ls_datum. I need a date 6 months prior to ls_datum (ls_datum - 6 months).

Any ideas please.....

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 31, 2008 at 09:54 PM

    Back in my 46c days, I was kind of partial to the RE_ADD_MONTH_TO_DATE function, you can just pass a negative number to go back.

    calculation-based-on-calmonth

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 31, 2008 at 09:48 PM

    Hi Raju

    check this FM

    IF pa_older = 'X'.
    CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
    EXPORTING
    date = ls_datum
    days = '00'
    months = '06'
    signum = '-'
    years = '00'
    IMPORTING
    calc_date = ls_datum_6.
    ENDIF.
    
    

    <REMOVED BY MODERATOR>

    Edited by: Alvaro Tejada Galindo on Jan 31, 2008 4:59 PM

    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.