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 no. of leaves taken.with holiday list for particular od location

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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