Hi,
try this
data: begin of itab occurs 0,
field type i,
field1 type i,
field2 type i,
end of itab.
data: wa like itab.
data: m type i.
itab-field = '10'.
itab-field1 = '20'.
itab-field2 = '30'.
append itab.
clear: itab.
loop at itab .
write:/ itab-field, itab-field1, itab-field2.
wa-field = itab-field.
wa-field1 = wa-field + itab-field1.
wa-field2 = wa-field1 + itab-field2.
append wa to itab.
write:/ wa-field, wa-field1, wa-field2.
exit.
endloop.
thanks & regards,
Venkatesh
plz any one
i need help i do it like that and its <b>work</b> but there is beeter way to do that
LOOP AT planned_hours ASSIGNING <wa_p_h>.
ADD <wa_p_h>-zhly TO l_sum.
MOVE l_sum TO wa_tmp-zhly. <----first field
ADD <wa_p_h>-h1 TO l_sum.
MOVE l_sum TO wa_tmp-h1. <----second field
ADD <wa_p_h>-h2 TO l_sum.
MOVE l_sum TO wa_tmp-h2. <-----so on
ADD <wa_p_h>-h3 TO l_sum.
MOVE l_sum TO wa_tmp-h3.
ADD <wa_p_h>-h4 TO l_sum.
MOVE l_sum TO wa_tmp-h4.
ADD <wa_p_h>-h5 TO l_sum.
MOVE l_sum TO wa_tmp-h5.
endloop
APPEND wa_tmp TO planned_hours.
Add comment