Skip to Content
0
Nov 15, 2011 at 04:44 PM

From otf spool ti pdf files: how to divide the spool/pdf

59 Views

Iu2019ve got a report which can list some sapscript spools, display them, recognize some data inside (to get an e-mail address) and send an e-mail with the spool attached as pdf file. Itu2019s perfect, but now I wish to divide the spool (or directly the pdf file).

By these instructions I can fill a table, by which one I can get the significant (for me) page numbers (from-to, from-to, u2026):

    SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN
      WITH rqident = wa_tsp01-rqident
      WITH first = '1'.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = mem_tab
      EXCEPTIONS
        not_found = 1
        others = 2.
    IF not mem_tab[] is initial.
      CALL FUNCTION 'LIST_TO_ASCI'
        TABLES
          listasci   = v_asci
          listobject = mem_tab
        EXCEPTIONS
          empty_list = 1
          list_index_invalid = 2
          others = 3.

What can I do after that? In the function module CONVERT_OTFSPOOLJOB_2_PDF there arenu2019t u201CFROM PAGEu201D and u201CTO PAGEu201D parameters (it would had been nice) and I donu2019t want to modify the original spool report (it isnu2019t a customized report: itu2019s an original sap one).

Thanks for your attention.

Best regards