Application Development 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: 

how to get each row between ranges

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

Hi SalKhan,

Use function module <b>DAY_ATTRIBUTES_GET</b> to get the all the attributes between a range of dates.

Thanks,

Vinay

Former Member
0 Kudos

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.

Former Member
0 Kudos

use FM HR_E_GET_PERIODS_FOR_INTERVAL

P_BEGDA = start date

P_ENDDA = end date

P_ABKRS = '01'