Get PDF-based PaySlips using OffCycle Workbench (PUOC_10)
For any organization, a payslip is really important document. Every employee, no matter if he/she is salaried, hourly OR temporary, needs a payslip for any future job OR for immigration process OR any loan assignment. The payslip cannot be too complex or too simple but must be designed to communicate effectively. Payslip or pay stub is generally known as a ‘remuneration statement’ in SAP. SAP Employee Self Service (ESS) provides a way for employees to access their payslip, but many customers not to choose ESS/MSS as part of their initial implementation. Also, many terminated employees are not able to get back into ESS to get their payslips. Customers are using different ways in SAP to print a ‘remuneration statement’ depending upon their HCM enhancement pack level. SAP has provided various technological ways to print payslips for ESS but in the backend without using ESS, such as: PE51 with SAP Scripts (PC00_M10_CEDT ) PE51 with SmartForms (PC00_M10_CEDT) HR Forms with SmartForms (PC00_M10_HRF) HR Forms with Form Builder ( PC00_M10_HRF) If you want to use the PE51 standard form, you should copy the standard form from client 000 (Tcode PDF8) based on country version. You can use the SPAD Tcode to register new device print format. Many SAP Payroll Admin are facing the below challenges in order to generate remuneration statements for multiple employees with multiple pay periods in a single run. Payroll Admins are not able to print PE51 Form using Off-Cycle Workbench Payroll Admins are not able to print multiple remuneration statements for multiple periods using single transactions So, I have decided to integrate PDF ESS-based remuneration statements with off-cycle workbench using enhancement framework. I found this tweak an easy and useful way for Payroll Admin to reduce their frustration with complex SAP Payroll processes a little. SAP Off-Cycle workbench program (SAPLHRPAY99_OC) is using Form “show_payslip_usab” to display remuneration form, which is an old design. I have added my enhancement at the form level and have converted the basic Form into a PDF form by using “XFORM” and “XINFO.” I have used the very useful Payroll function module ‘BAPI_GET_PAYROLL_RESULT_LIST’ to get “Pay-Result List” for a selected range of Payroll periods and loop them to generate “Print PDF.” Now I have to find a way to trigger a PDF inside SAP’s UI. To do this, I have created a FM (Z_HRPY_ESS_PAYSLIP_FM) with import parameters “IM_PDF_STRING_X” and “IM_PDF_SIZE.” This FM calls a PDF Screen ‘100,’ which I have designed in SAP SE51 editor. FM has a separate logic to convert input XSTRING PDF string into Hex table with a 1000 length.
After this, I faced a small challenge of how to go back into OffCycle Workbench from Screen “100” without leaving buffer values for PDF content. However, this was also very simple to do. I used below code.
CALL METHOD cl_gui_cfw=>FLUSH.
LEAVE TO TRANSACTION ‘PUOC_10′ AND SKIP FIRST SCREEN.
That’s all. I am all set to get PDF multiple statements (ESS Statements) for multiple payroll periods using Offcycle Workbench.
Also, Payroll Admin can use the in-built “Send Email” process in the PDF to email payslips to any active OR inactive employees.