please have a look
Please have a look at the Wiki shared by the Sikindar , it is very helpful
Other way to debug the issue is go to system and click on status and click on program i.e payroll program and select the particular inculde and keep a break point inside the inculde program and run the payroll.
e. g If you in indian payroll you want to know an Ee PF calc then go to SE38 HINCALCO and click on inculde pcepfin0. " Provident fund contributions and gothrough the lines of code and understand the logic and you can keep break point at the req line and simulate the payroll.
The payroll simulation will come and stop at the particular function.
Hope this is will help.