Hi Shaik;
You can use BADI "HCM_B_PAYSTUBS" to calculate the Net pay, Gross pay, and Deductions for a particular payslip. The logic used in the payslip could be different. So you can use the same here in the BADI also to fetch.
Regards,
Sarbjeet Singh