10-11-2007 1:49 PM
Dear Experts,
Is there any Function module to find the Number of weeks
( one or two or three or four) in a given date range in a month
and which week(Ist or second or third or forth).
For example : if I give 01.05.2007 to 07.05.2007 ( here one week it is first week)
03.05.2007 to 12.05.2007
( here two and week ,first second like this I need)
with in a one month.
Thanks and Regards,
Praveen
10-11-2007 1:56 PM
Hi,
Please try with HR_99S_INTERVAL_BETWEEN_DATES. and let me know if any issues.
Reward points.....
Regards,
Ramakrishna kotha.
10-11-2007 1:59 PM
You can use function module HR_99S_INTERVAL_BETWEEN_DATES. The field C_WEEKS will return the number of complete weeks (as an integer) between two dates, and the field WEEKS will return total weeks (as a decimal number).
- April King
10-11-2007 2:01 PM
hi Pravenn,
I don't know about these functions, but u can try anything like this:
data:
strdate like sy-datum value '20070901',
enddate like sy-datum value '20070909',
date(10),
moddate(1).
date = enddate - strdate + 1.
moddate = date mod 7.
date = date div 7.
if moddate <> 0.
date = date + 1.
endif.
write: / date.
Regards
Allan Cristian
Message was edited by:
Allan Cristian
10-11-2007 2:24 PM
HR_IE_NUM_PRSI_WEEKS try this FM.
DATE_GET_WEEK ...also try this....
Regards
Vasu