03-19-2009 9:50 AM
hello,
i have an alv grid that displays timesheet of employee. it displays the no of hours the employee
has worked on his project on each day of the month.
the table looks like this,
emp_name proj_id 1 2 3 4 5 ... 30 total
abc 010 1 2:30 3 1:20 2:30 ... sum
i want to calculate the addition of the time the employee is worked in the whole month and display
the result in the last column of the grid(total)...
hope i have asked my question clearly..
plz help me out,
thank you...
03-19-2009 9:58 AM
hi
LOOp at itab(grid).
temp = temp + itab1-1day + itab1-2day+....itab1-30day .
AT new emp .
itab1-lastcolumn = temp.
clear temp .
endloop.
temp contains the total hrs and is passed to last column.
03-19-2009 9:55 AM
03-19-2009 9:58 AM
hi
LOOp at itab(grid).
temp = temp + itab1-1day + itab1-2day+....itab1-30day .
AT new emp .
itab1-lastcolumn = temp.
clear temp .
endloop.
temp contains the total hrs and is passed to last column.
03-19-2009 10:00 AM
Hi,
You have to caluculate in this way like.
suppose daily 8 hrs is fixed hours
tot_hr is hours that user worked.
now suppose anu user work 9 hrs,then
add_hr = tot_hr - fix_hr
1 = 9 - 8
if add_hr GT 0.
u have t store taht in another vaiable.
in thsi same way u have to cal culate for exh day.
like
w_add_ tot = w_add_tot + add_hr.
so show this total in your last column.
Thanks & Regards,
Anagha Deshmukh