cancel
Showing results for 
Search instead for 
Did you mean: 

LIST REPORT with line-size 279 to PDF document

Former Member
0 Kudos

Hi,

I have a classical report outputting dynamic internal table contents, I wanted this to be in PDF document. I have used LIST to PDF conversion technique to get PDF document, which is successful. But I see the font size is small.

I have used FM: CONVERT_ABAPSPOOLJOB_2_PDF with the following values being passed.

CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'

EXPORTING

src_spoolid = l_id

no_dialog = space

  • PDF_DESTINATION = 'X'

  • get_size_from_format = 'X'

IMPORTING

pdf_bytecount = l_bytecount

TABLES

pdf = t_pdf

EXCEPTIONS

err_no_abap_spooljob = 1

err_no_spooljob = 2

err_no_permission = 3

err_conv_not_possible = 4

err_bad_destdevice = 5

user_cancelled = 6

err_spoolerror = 7

err_temseerror = 8

err_btcjob_open_failed = 9

err_btcjob_submit_failed = 10

err_btcjob_close_failed = 11

OTHERS = 12.

when I make use of get_size_from format parameter in the FM, I'm able to get bigger font but layout is not proper (like page format should have been in LANDSCAPE but it is display PDF in PORTRAIT ).

I'm trying to build PDF with LETTER format in LANDSCAPE orientation.

I had searched enough threads in forum but no relevant answers for this type of issue.

Appreciate your quick responses. Thank you.

Best Regards,

Babu

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member305388
Active Contributor
0 Kudos

So, you want to display the list in PDF in Lanscape format, right? You can do this:


  CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
      layout               = 'X_65_132'
      no_dialog            = gc_x
      line_count           = 60
    IMPORTING
      out_parameters       = gs_print_params
      valid                = gv_valid
    EXCEPTIONS
      invalid_print_params = 2
      OTHERS               = 4.

  SUBMIT ztest_report TO SAP-SPOOL
                    SPOOL PARAMETERS gs_print_params
                    WITHOUT SPOOL DYNPRO
                    WITH p_date eq p_date
                    AND RETURN.

* After getting the spool id, do the below

  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
    EXPORTING
      src_spoolid              = gv_rqident
      no_dialog                = space
      dst_device               = gs_print_params-pdest
    IMPORTING
      pdf_bytecount            = gv_bytecount
    TABLES
      pdf                      = gt_pdf
    EXCEPTIONS
      err_no_abap_spooljob     = 1
      err_no_spooljob          = 2
      err_no_permission        = 3
      err_conv_not_possible    = 4
      err_bad_destdevice       = 5
      user_cancelled           = 6
      err_spoolerror           = 7
      err_temseerror           = 8
      err_btcjob_open_failed   = 9
      err_btcjob_submit_failed = 10
      err_btcjob_close_failed  = 11
      OTHERS                   = 12.
  IF sy-subrc NE 0.
*    MESSAGE text-e02 TYPE gc_e.
  ENDIF.

  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename                = gv_file
      filetype                = 'BIN'
    IMPORTING
      filelength              = gv_binsize
    TABLES
      data_tab                = gt_pdf
    EXCEPTIONS
      file_write_error        = 1
      no_batch                = 2
      gui_refuse_filetransfer = 3
      invalid_type            = 4
      no_authority            = 5
      unknown_error           = 6
      header_not_allowed      = 7
      separator_not_allowed   = 8
      filesize_not_allowed    = 9
      header_too_long         = 10
      dp_error_create         = 11
      dp_error_send           = 12
      dp_error_write          = 13
      unknown_dp_error        = 14
      access_denied           = 15
      dp_out_of_memory        = 16
      disk_full               = 17
      dp_timeout              = 18
      file_not_found          = 19
      dataprovider_exception  = 20
      control_flush_error     = 21
      OTHERS                  = 22.

Former Member
0 Kudos

Hi Babu,

Check below link:

[;

Also check this link:

[;

Hope this helps.

BR

Dep

Edited by: DeepakNandikanti on Aug 24, 2011 7:00 AM