The GET PERNR LAST event basically gets triggered when all payroll records for a specific pernr have been processed, so can be a good place to generate totals
So basically given the following code skelleton:
GET PERNR LAST.
*abap code i.e. process totals
*abap code, i.e. incrementing totals
The program would loop at employee perner's and for each pernr it would loop around the payrole data (GET PAYROLE), once this looping around GET PAYROLE has finished for the current pernr it will call GET PERNR LAST where you can perform any processing that needs doing at the end of each pernr record.
Please note in the above example i believe the GET PERNR LATE will achieve the same results!