I did this, but you will need to think of a way to deal better with your data.
Instead of having aggregates and local variables in the same data you will have problems because at this moment you don't have any ids and you cannot look for records without ids just using the current row number. But to use the current row number you will need to have everything in the same structure.
If you want to use local variables and aggregates in the same table you will need to create the record in the database and return the id and append it to the aggregate/list the id created, this way you can use the list index of to find the record with he id you are trying to update.
Right now I am passing the amount and the currentrownumber

And I use an action to do the calculations and to update the record in the same list.
The current row number comes from the local list on the table. With the current row number, I can go directly to the record and update it.
You can use this or you can find the position of the record using the list index of when you got everything working using the aggregates. But for now, you should check the sol and try to see what is best for you.

Because right now I am using the vat from the local list

Check the OML.
Regards,
Márcio