Application Development and Automation 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: 
Read only

Convert spools to Pdf format

Former Member
0 Likes
494

Hi,

I know a standard program RSTXPDFT4 which converts a single spool to PDF.

Do we have any thing for multiple spools? My requirement is I will key in Spool numbers via Selection options and I want Pdf file separetly to be dumped for each file

in to folder on to my hard drive.

Regards

Vara

Vara,

I see RSTXPDFT4 requires Spool Number and PDF file path... If you want a different PDF file for each spool. Write a Z* program and SUBMIT RSTXPDFT4 for each spool.

Or I guess CONVERT_OTFSPOOLJOB_2_PDF function module is being used for converting spools to PDF. Call this function module in your program for each spool.

2 REPLIES 2
Read only

Former Member
0 Likes
471

You can start with this:

PARAMETERS: spoolid LIKE tsp01-rqident OBLIGATORY.   "DEFAULT 9429.

DATA BEGIN OF pdf_table OCCURS 0.
        INCLUDE STRUCTURE tline.
DATA END   OF pdf_table.

DATA pdf_fsize TYPE i.

CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
     EXPORTING
          src_spoolid   = spoolid
          no_dialog     = 'X'
     IMPORTING
          pdf_bytecount = pdf_fsize
     TABLES
          pdf           = pdf_table
     EXCEPTIONS
          OTHERS        = 0.

CALL FUNCTION 'DOWNLOAD'
     EXPORTING
          bin_filesize = pdf_fsize
          filetype     = 'BIN'
     TABLES
          data_tab     = pdf_table.

Rob

Read only

TuncayKaraca
Active Contributor
0 Likes
471

Vara,

I see RSTXPDFT4 requires Spool Number and PDF file path... If you want a different PDF file for each spool. Write a Z* program and SUBMIT RSTXPDFT4 for each spool.

Or I guess CONVERT_OTFSPOOLJOB_2_PDF function module is being used for converting spools to PDF. Call this function module in your program for each spool.