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: 

CONVERT_ABAPSPOOLJOB_2_PDF

Madjid
Participant
0 Kudos
989

Hello


i want merging multiple spools into a single PDF . with "CONVERT_ABAPSPOOLJOB_2_PDF" but i have two problem first all spool file not merge in one pdf .
second when send and image in spoole it is not print truly . it has garbage .

thank you


5 REPLIES 5

RaymondGiuseppi
Active Contributor
488

Only use CONVERT_ABAPSPOOLJOB_2_PDF for Abap spool not for OTF:

  CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
    EXPORTING
      authority     = 'SP01'
      client        = tsp01-rqclient
      name          = tsp01-rqo1name
      part          = 1
    IMPORTING
      type          = type
      objtype       = objtype
    EXCEPTIONS
      fb_error      = 1
      fb_rsts_other = 2
      no_object     = 3
      no_permission = 4.
  IF objtype(3) = 'OTF'. "OTF
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    " ...
  ELSE. " Abap
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
    " ...
  ENDIF.

Comments on some recently released notes:

  • 2387085 - Converting spool requests to PDF, provided the class CL_RSPO_SPOOLID_TO_PDF which no longuer require to check the spool type yourself.
  • 2264208 - Merging PDF files (ABAP interface), provided the class CL_RSPO_PDF_MERGE for your requirement.

0 Kudos
488

thank you Raymond

i use 'convert_abapspooljob_2_pdf' . but for image file it does not work probably

the PDF file has garbage code

0 Kudos
488
madjied khanevadegi It's just impossible to store an image in a spool of type ABAP List. Consequently, you get "garbage" when you output to PDF because the spool is itself garbage. Probably the spool is not of type ABAP List, it's of type OTF. Please follow Raymond advice!

0 Kudos
488

With SP01/SP02 check the icon associated to the spool, there are different icons for Abap spool, OTF spool, Interactive Forms by Adobe;etc. (Look at the displayed tooltip when the cursor move onto the icon.)

0 Kudos
488

It's frustrating !