Application Development and Automation 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: 
Read only

Fn Module to return specified date

Former Member
0 Likes
695

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
Read only

Former Member
0 Likes
674

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
Read only

Former Member
0 Likes
675

hi,

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

thanks,

anupama.

Read only

Former Member
0 Likes
674

Use FM HR_HK_DIFF_BT_2_DATES.

Read only

Former Member
0 Likes
674

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.

Read only

Former Member
0 Likes
674

You dont need a function module

new_date = sy-datum - 100.

will give you your required date.

Read only

Former Member
0 Likes
674

thank u .solved the problem