Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Fn Module to return specified date

Former Member
0 Kudos

hi sap gurus,

is there any function module which returns me the past date with the input specifying no .of days.

for ex.

if i specify no.of days as 1000.

it must return me : sy-datum - 1000.

Edited by: rakesh on Jan 22, 2009 12:13 AM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

there is no need of any FM if you use as SY-DATUM - 1000 you will get the result.

thanks,

anupama.

5 REPLIES 5

Former Member
0 Kudos

hi,

there is no need of any FM if you use as SY-DATUM - 1000 you will get the result.

thanks,

anupama.

Former Member
0 Kudos

Use FM HR_HK_DIFF_BT_2_DATES.

Former Member
0 Kudos

check this:

DATA: date1 TYPE sy-datum.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
  EXPORTING
    date      = sy-datum
    days      = 0
    months    = 1
    signum    = '-'
    years     = 0
  IMPORTING
    calc_date = date1.
WRITE date1.

Former Member
0 Kudos

You dont need a function module

new_date = sy-datum - 100.

will give you your required date.

Former Member
0 Kudos

thank u .solved the problem