Skip to Content
author's profile photo Former Member
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

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    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

  • author's profile photo Former Member
    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

  • author's profile photo Former Member
    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

    w_add_ tot = w_add_tot + add_hr.

    so show this total in your last column.

    Thanks & Regards,

    Anagha Deshmukh

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.