Hi,
Your scenario is very typical. It can be solved in any of the following ways:
1) You can try using off-cycle payroll, where you can pay to the deceased and deduct from others. But check, whether in off-cycle, you can make deductions.
2) You can pay an interim advance to the deceased by making rough estimate of 1% basic + da from all the employees. This can be done by using se16 or sap query to query basic pay infotype and doing a sum and divide by 100. You can settle the balance in the regular payroll run by deducting from all the employees.
3) As you said, you can also write abap program to make deduction entry in all the employees and make payment entry to the deceased. But here again, you must make some financial transaction, since, payroll only can make calculations. But ultimately, money has to go via finance.
You can use IT15 if it is a regular payroll run or use appropriate infotype if it is off-cycle payroll. You can have appropriate action type for deceased.
I hope I had given some broad idea.
regards,
bala.