Hi Albina:
Maybe you can just use payroll status infotype (0003) run payroll up to field (ABWD1) to cover this situation.
Field help state:
"End of processing 1 (run payroll for pers.no. up to)"
Date up to which the payroll is run for the employee, even if he or she has left the company.
In this payroll run, the system selects an employee who is not active in this payroll period if the end of processing 1 is set.
You can set the end of processing 1 in the Payroll Status (0003) infotype. The end of processing 1 can also be set by the system through various functions, in deductions for example.
This date must be in a period in which the employee is not active."
When you would run separation action put end of time in that field and whenever you receive confirmation of sponsorship transfer you could maintain the date from end of time to a specific end of payroll period date so that payroll driver does not take this employee further in the calculation processing.
Salary from basic pay infotype should be processed automatically since all your /8xx wagetype would be valuated at 0. You may have to watch for data from other source (eg infotype 0014 and 0015, and further). Some wage types might have a direct value and no reduction set in T512W....
If somehow that is failing a simple fix could be to force a 0 value if STAT3 eq 0. You can use operation OUTWPSTAT3 while processing IT both at the end of the time sub-scheme and factoring sub-scheme before storage to RT table.
Best,
Antoine