2010 May 20 8:32 AM
Hi Gurus,
I need to know if there is a module to perform functions and return the following:
He passed as parameters date1 and a number of days and will return a date2 date1 result of adding the more the number of days.
Input Parameters:
- Date1
- No. days
Result:
date2 = date1 + N ° days
Thank you.
Regards,
2010 May 20 8:36 AM
Hi,
You can achieve this directly by adding the desired number of days to a date type variable.
DATA: date1 type sydatum,
date2 type sydatum,
N_days type i value 4.
date1 = sy-datum.
date2 = date1 + N_days.
write: date1, / date2.
Edited by: Jayesh Gupta on May 20, 2010 9:39 AM
2010 May 20 8:36 AM
Hi,
You can achieve this directly by adding the desired number of days to a date type variable.
DATA: date1 type sydatum,
date2 type sydatum,
N_days type i value 4.
date1 = sy-datum.
date2 = date1 + N_days.
write: date1, / date2.
Edited by: Jayesh Gupta on May 20, 2010 9:39 AM
2010 May 20 8:52 AM
Hi,
You can also use FM ADD_TIME_TO_DATE, with i_idate = origin_date, i_time = number of days, i_iprkz = 'D'
the result is o_idate = i_idate + i_time
Anyways, there are other FMs where you can use calendars, for example when you only want to compute workdays.
Regards,
2010 May 20 8:57 AM
2010 May 20 9:04 AM
Thanks!! it's solved!!
forgot to tell you that the environment I'm working on is SAP BI.
And MF comentais I do not exist, as I have suggested will implement Jayesh.