Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

To download payslip in PDF format employee wise

Former Member

Hi,

Currently the payslip of each employee is printing in each page of smart form output. Now I want to download the payslip of each employee in separate PDF files. I am using FM: CONVERT_OTF_2_PDF.

Please advice.

Thanks & Regards,

Neenu

1 ACCEPTED SOLUTION

Shubham1
Employee
Employee

Hello

There is this blog which gives detailed understanding on emailing HR pay-slips as PDF attachments.

You may read the relevant parts from the same & utilize it in our tasks.

Regards

Shubham

3 REPLIES 3

Laszlo_B
Advisor
Advisor
0 Kudos

Hello Neenu,

as far as I know the page selection can not be provided at the beginning of a PDF conversion.

A workaround for this is to go to transaction SP01 -> select the checkbox of the spool you would need -> select menu "Spool Request"->"Print"->"Print with changed parameters...".

Now the R/3 Output Device selection will show up. Here select the required page, and select a PDF Output Device which can convert the spool into PDF (so you can download the file with a File printer). Follow the description of SAP KBA #1580639 - "Is a PDF software required in windows for PDF conversion via device PDF1?" on how PDFs can be "printed" / downloaded with a File printer.

To use a better solution, first I would create an individual spool for each payslip, then make a mass PDF conversion and download.

This means:

- deselect the "Append spools" flag in the application. This means that when a spool is finished by the application, the next spool by the application won't be added to the previously finished one.

---> For example: Spool 1001 will be created for employee 1; Spool 1002 will be created for employee 2; Spool 1003 will be created for employee 3; etc.

- go to transaction SP01 and display these spools

- press button "Select All", so the checkbox of all displayed spools will be checked

- select menu "Spool Request" -> "Forward" -> "Export as PDF..."

- the mass PDF conversion will be initialized.

If you can not find the "Export as PDF..." menu, go through SAP Note #1717357 - "Download spool requests from SP01"

Best regards,

Laszlo

Shubham1
Employee
Employee

Hello

There is this blog which gives detailed understanding on emailing HR pay-slips as PDF attachments.

You may read the relevant parts from the same & utilize it in our tasks.

Regards

Shubham

saipuro-21
Discoverer
0 Kudos

Hello Neenu

I have similar requirement could you please explain your code in short like what FM you used to print payslip of different employee on different page.