First you shouldn't call it totals or subtotals, because they aren't really. So therefore all the aggregate functions won't work.
You need to show a percentage of failed records, prefarably as a line on the bottom of your output ?
There are more ways to do this.
You can do the calculation before you show alv and add this as a row to you output table to show
You can also create a header for your alv list inwhich yuo show the calculated percentage value.