2007 Jan 22 12:38 PM
Hi Friends,
I have to update my final table, I have my line item data in my lt_balance, I want to sum the field betrw and modify the final internal table. Can any one check this code.
loop at it_final into w_final.
at end of partner.
sum.
read table it_final into w_final index sy-tabix.
w_final-amount = lw_balance-betrw.
modify table it_final from w_final transporting amount.
endat.
endloop.
Thanx in advance,
Line
Hi Friends,
I have to update my final table, I have my line item data in my lt_balance, I want to sum the field betrw and modify the final internal table. Can any one check this code.
loop at it_final into w_final.
at end of partner.
sum.
read table it_final into w_final index sy-tabix.
w_final-amount = lw_balance-betrw.
modify table it_final from w_final transporting amount.
endat.
endloop.
Thanx in advance,
Line
2007 Jan 22 12:45 PM
Hi,
Are you trying to update the same internal table with the final value.?
Do you have to update all the lines of the table which belongs to the same partner with the final value..
In that case
Try changing the code to the following,
DATA : final_amount type betrw.
loop at it_final into w_final.
at end of partner.
sum.
w_final-amount = lw_balance-betrw.
endat.
modify table it_final from w_final transporting amount.
endloop.
Please reward points if it helps
Regards
2007 Jan 22 12:50 PM
Hi,
I want to update only betrw value into the final internal table.
Line
2007 Jan 22 12:58 PM
Hi
You should use another work are to read again the internal table:
loop at it_final into w_final.
w_final2 = w_final.
at end of partner.
sum.
w_final2-amount = w_final-betrw.
modify table it_final from w_final transporting amount.
endat.
endloop.But in this you've update only the last record for a certain PARTNER, do you want this or you want to update all?
Max
2007 Jan 22 12:59 PM
2007 Jan 22 1:15 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |