‎2008 Mar 25 3:49 PM
HI,
Could you please suggest the function module the below reqiurments
1) adding days to date.
ex: 20 days to 25.03.2008 = 15.04.2008
2) To find the given date is working date or not according to factory calender id.
3) To find the previous or last working date to the given date(Holiday date) according to the factory calender id.
It is very urgent requirment. please help me.
Thanks in advance
sathish kumar swamy
‎2008 Mar 25 3:59 PM
Add days
ADD_TIME_TO_DATE
Check working day
DATE_CHECK_WORKINGDAY
Holyday I think you can do it using the holyday and going in reverse until you find the working day
Edit
I found this one
DATE_CONVERT_TO_WORKINGDAY
It can give you the last working or the next working day
Edited by: Ramiro Escamilla on Mar 25, 2008 5:10 PM
‎2008 Mar 25 4:11 PM
hi use this...
RE_ADD_MONTH_TO_DATE
DATE_CONVERT_TO_FACTORYDATE
CALL FUNCTION 'OIL_LAST_DAY_OF_PREVIOUS_MONTH'
EXPORTING
I_DATE_OLD = date1
IMPORTING
E_DATE_NEW = date1
.
data date2 like sy-datum.
date2 = date1 + 1.
write date2.
If you put 27.12.2005 as the input date, date2 you will get as 01.12.2005.
Or else you can use the following code:
v_startdate = sy-datum.
v_startdate+6(2) = '01'.
v_enddate = v_startdate.
if v_enddate+4(2) >= '01' AND v_enddate >= '11'.
v_endate4(2) = v_enddate4(2) + 1.
elseif v_enddate = '12'.
v_enddate+4(2) = '01'.
v_enddate(4) = v_enddate(4) + 1.
endif.
v_enddate = v_enddate - 1.
regards,
venkat.