2008 Oct 23 2:16 PM
xperts,
any fn mod available for getting dates like;
if i am exec on Mon;
Sun Mon Tue Wed Thu Fri Sat
Sun Mon Tue Wed Thu Fri Sat (10 days)
if i am executing it on Wed.
Sun Mon Tue Wed Thu Fri Sat
Sun Mon Tue Wed Thu Fri Sat (8 days)
wat i need is the date.
and the passing parameter is sy-datum
eq:if sy-datum = 20081023
dates i hav to gt : 23 24 27 28 29 30 31
xperts,
any fn mod available for getting dates like;
if i am exec on Mon;
Sun Mon Tue Wed Thu Fri Sat
Sun Mon Tue Wed Thu Fri Sat (10 days)
if i am executing it on Wed.
Sun Mon Tue Wed Thu Fri Sat
Sun Mon Tue Wed Thu Fri Sat (8 days)
wat i need is the date.
and the passing parameter is sy-datum
eq:if sy-datum = 20081023
dates i hav to gt : 23 24 27 28 29 30 31
2008 Oct 23 2:25 PM
Hi
PARAMETERS: p_datum TYPE sy-datum.
data: day type sy-datum,
last_day_of_month TYPE sy-datum.
START-OF-selection.
CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
DAY_IN = p_datum
IMPORTING
LAST_DAY_OF_MONTH = last_day_of_month.
day = p_datum.
do.
write: / day.
if day = last_day_of_month.
exit.
endif.
day = day + 1.
enddo.Max
2008 Oct 23 2:28 PM
I dont think he needs last days in months, if I got him correctly what he is looking for is all the days except sat / sun upto next friday
#1 - I dont think there is a FM for that, you need to code for that finding the day for your date, then adding the days accordingly.
2008 Nov 12 8:01 AM
Developed logic for that,
lv_dat_tmp = sy-datum.
do 14 times.
call function 'RH_GET_DATE_DAYNAME'
exporting
langu = sy-langu
date = lv_dat_tmp
importing
daynr = lv_daynr.
if lv_daynr eq 6.
lv_dat_tmp = lv_dat_tmp + 2.
elseif lv_daynr eq 7.
lv_dat_tmp = lv_dat_tmp + 1.
else.
lx_date-pedtr = lv_dat_tmp.
append lx_date to lt_date.
if lv_daynr eq 5 and lv_status ne 6.
lv_status = 1.
endif.
lv_dat_tmp = lv_dat_tmp + 1.
lv_status = ( lv_status * 1 ) + 1.
endif.
if lv_status eq 7.
exit.
endif.
enddo.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |