Skip to Content

Do you wonder how easy it is to create PDF files from a spool number. it is  just two steps process.

Step-1 : Take a spool number and pass to FM “CONVERT_ABAPSPOOLJOB_2_PDF”

DATA: lv_spool_id type TSP01-RQIDENT value ‘748100’,
            lt_pdf_data type table of tline WITH HEADER LINE.     

CALL FUNCTION ‘CONVERT_ABAPSPOOLJOB_2_PDF’
   EXPORTING
     SRC_SPOOLID                    = lv_spool_id
   TABLES
       PDF                                 = lt_pdf_data .

Step-2 : Down load PDF File

Data :lv_file_name type string value ‘c:\kalu1.pdf’.

CALL FUNCTION ‘GUI_DOWNLOAD’
   EXPORTING
     FILENAME                        = lv_file_name
    FILETYPE                        = ‘BIN’                     “Most Important replace default value of ASC to BIN otherwise you may not able to open the file

   TABLES
     DATA_TAB                        =  lt_pdf_data[] .

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply