Skip to Content

what is function module get previous date by enteing no of days

FM should take : 7 days

and should return : 4.12.2007

as output.

Thanx,

Naveen

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    Dec 11, 2007 at 03:51 AM

    Hi,

    Try this fn module,

    RP_CALC_DATE_IN_INTERVAL

    It add/subtracts years/months/days from a date

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 11, 2007 at 04:30 AM

    Hi Naveen,

    You can get Good list of FM's regrading Date from :

    http://sap4.com/contentid-130.html

    Regards,

    Sachin Bhatnagar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 11, 2007 at 03:53 AM

    Hi,

    check the function module

    RP_CALC_DATE_IN_INTERVAL

    Regards,

    siva chalasani

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 11, 2007 at 03:55 AM

    Hi Naveen ,

    If you are looking at a date 7 days back without considering the factory calendar or working days , then you do not need to use a FM , you can directly substract 7 from the current data , to get the desired result.

    Regards

    Arun

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 11, 2007 at 04:03 AM

    Hi,

    Apart from function module, you can write as follows.

    data : date1 type datum,

    date2 type datum.

    date1 = sy-datum.

    date2 = date1 - 7 .

    write date2.

    Add comment
    10|10000 characters needed characters exceeded