Former Member

# problem in alv grid

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...

##### Add a comment
10|10000 characters needed characters exceeded

### Related questions

Former Member
Posted on Mar 19, 2009 at 09: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.

##### Add a comment
10|10000 characters needed characters exceeded
• Former Member
Posted on Mar 19, 2009 at 09:55 AM

Hi,

Have you tried the function sum of alv.

Thanks

##### Add a comment
10|10000 characters needed characters exceeded
• Former Member
Posted on Mar 19, 2009 at 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

so show this total in your last column.

Thanks & Regards,

Anagha Deshmukh

##### Add a comment
10|10000 characters needed characters exceeded