Which legislation are you working on and what version of Apps ?
Online Payslip is provided by Oracle as a seeded solution, through Employee self-service for most of the legislations.
On the seeded screen, you have an LOV for the payroll period date. And you can select a period to view the payslip for that period.
If you have created a custom solution you need to replicate it the same way.