Sap Spool To Pdf Conversion Program
Often the ABAP list report needs to viewed as PDF and attach email. And usually submit report to spool, then the spool is converted to PDF.
Its like 34 steps regularly. I collected all the code and created a function to do all the steps. Process is Submit the same report to spool and get the spool to convert to PDF / or Download the PDF to particular directory. This helped me learn and work on XSTRING. I got problem in retriving the spool from the database for recently created, then i come up with exact time it is being created to pick the spool no.
Once spool number is ok, Then its convert to Xstring, PDF Tab or Download directly to file. Reason for returning XSTRING/PDF tab to be used for attaching email/other purposes.Where to Use:You can use it inside your program code itself. Or AT USER-COMMAND. For custom button click.How to Use:If Download eq ‘X’ is passed, then function will be expecting the filename to be given.
Sap Spool To Pdf Conversion Program For Windows 10
So give the filename with full path and dont forget ‘.pdf’ to include in it. If you dont want the output PDF File to be created just pass IDOWNLOAD eq space.
IPAART is the page format, it can specified to your own format as well. Some times the linesize of the PDF needed to be changed often, in that case pass the size value to ILINSZ.