09-10-2007 4:10 AM
hi
i want to know how to get no. of leaves applied(which were approved) by employee and dates of holiday at his working place i.e. his/her OD Location.
for e.g. if at his/her od friday and sunday is off den i want to know the dates of those days within given period
regards
vivek
09-10-2007 5:35 AM
hi,
try with FM 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
in import section
I_DATE_FROM = p_oldate
I_DATE_TO = p_newdate
I_FLG_SEPARATE = 'X'
...................
..............
export
...................
if helpful reward some points.
with regards,
Suresh Aluri
09-10-2007 1:17 PM
Hi Vivek,
Try the below code to meet your second requirement,
i.e. what dates come on Friday n Sunday between the
given date range...
cut n paste this code in IDES, n check the output...
data: p_date type dats,
day type i,
i_date type standard table of dats with header line.
select-options: s_date for p_date.
p_date = s_date-low.
while p_date <= s_date-high.
day = ( ( p_date - '19790101' ) MOD 7 ) + 1.
if day = 5 or day = 7.
exit.
endif.
p_date = p_date + 1.
endwhile.
i_date = p_date.
append i_date.
while p_date <= s_date-high.
if day = 5.
p_date = p_date + 2.
if p_date <= s_date-high.
i_date = p_date.
append i_date.
p_date = p_date + 5.
if p_date <= s_date-high.
i_date = p_date.
append i_date.
else.
EXIT.
endif.
else.
EXIT.
endif.
else.
p_date = p_date + 5.
if p_date <= s_date-high.
i_date = p_date.
append i_date.
p_date = p_date + 2.
if p_date <= s_date-high.
i_date = p_date.
append i_date.
else.
EXIT.
endif.
else.
EXIT.
endif.
endif.
endwhile.
loop at i_date.
write : / i_date.
endloop.
Happy coding ....
Regards,
SJ
09-10-2007 1:42 PM
Hi,
As far as the first requirement,
I am not sure of what exactly is required,
If you can rephrase, it will be helpful for all of us to help you ..
Regards,
SJ
09-11-2007 3:57 AM
hi
if any problem u ppl facing ...den
i just want to know..dates of working days for an employee at his operating division for given period...question is as simple as that