Hi,
You re arrange your internal table as below.
field1 field2 field4 field3
then code as below to archive your requirement
Loop tab into wa_tab.
sum = sum + field3.
At End of field 4.
wa_tab-field3 = sum.
Append wa_tab to tab1.
clear :sum,wa_tab.
endloop.
Hope this will help your requirement.
Regards,
Bhushan