08-22-2007 7:26 PM
Hi,
How can i get the each row between range.
e.g
I have date range, 01012005 to 01012007.
I want to get all month and year in internal table between this range.
helpfull answers will be rewarded.
Thanks,
Message was edited by:
Sal Khan
08-22-2007 7:35 PM
Hi SalKhan,
Use function module <b>DAY_ATTRIBUTES_GET</b> to get the all the attributes between a range of dates.
Thanks,
Vinay
08-22-2007 7:38 PM
data : begin of itab occurs 0,
month(2),
year(4),
end of itab.
data : lv_start type sy-datum,
lv_end type sy-datum.
lv_start = '20050101'.
lv_end = '20070101'.
while lv_start le lv_end.
itab-month = lv_start+4(2).
itab-year = lv_start+0(4).
append itab.
lv_start4(2) = lv_start4(2) + 1.
endwhile.
08-22-2007 7:48 PM
use FM HR_E_GET_PERIODS_FOR_INTERVAL
P_BEGDA = start date
P_ENDDA = end date
P_ABKRS = '01'