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 can i Calculate no. of Presents & Absents of employee in shift wise

Former Member
0 Kudos

Dear Gurus,

I want to calculate no,of presents and absents of employee in shift wise.

my requirement is when im giving input From date & To date i want calculate number of presents and absents of

employee in shift wise.

please give solution.

Thanks

Madhankumar

1 REPLY 1

Former Member
0 Kudos

u can find absences in pa2001 table.

check unpaid leaves for the emp.

first take the no of employees working in company from pa0001 tab.

data: a type i, b type i,c type i,d type i.

select * from pa0001 where persg = check the no for active emp. i guess it is 3.,

so query will be,

select * from pa0001 where persg = ' 3 ' .

a = sy-dbcnt.

" 'a' will have no of emp working in company.

select * from pa2001 where startdate = sy-datum.

b = sy-dbcnt.

present_emp = a - b.

absence_emp = b.