on 10-07-2008 7:16 AM
HI FRNS,
i need to calculate all the dates within a selection period ...
in an internal table ..
for example :
1/5/2008 to 20 /6/2008
thn i need in my internal table ...
1/5/2008
2/5/2008
.........
.............
19/6/2008
20/6/2008
is there any solution .
Thanks and Regards
Priyank Dixit
Hi Priyank,
Lets say low_date = 1/5/2008 and high date = 20 /6/2008
( both these varaibles be of type sy-datum).
While low_date <= high_date
append low_date to itab.
low_date = low_date + 1.
endwhile.
rgds
Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Good
Please check the below sdn link, hope this will help you to solve your problem.
https://forums.sdn.sap.com/post!reply.jspa?threadID=1038784
Thanks
mrutyun^
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FIMA_DAYS_BETWEEN_TWO_DATES
use this FM
it will work for sure
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
first find out how many days are there between the dates ..take it as X..you have FM to do that.
then use a DO X times stmnt..
inside the Do use the FM
RP_CALC_DATE_IN_INTERVAL_SG
and give the number of days as 1.
this fm will give u the next date..
keep appendin gthis values to an itab..
i hope this will help u.
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Priyank,
When date range is given in input, you can capture the diff. between the dates and then use DO ENDDO loop for that many times and go on incrementing date by 1 and append it in internal table.
For example :
so_date BT 01.10.2008 & 07.10.2008
then get the diff.
w_diff = so_date-high - so_date-low.
do w_diff times
it_date-dates = so_date-low.
append it_dates.
so_date-low = so_date-low + 1.
enddo.
You can work out with this logic....
Hope this solves your problem.
Regards,
Shailesh Jadhav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.