Skip to Content
author's profile photo Former Member
Former Member

Maximize the PDF during report preview

Hi

I am using the function module SSFCOMP_PDF_PREVIEW for previewing the engagement report in PDF however the window size when previewing in PDF is smaller than normal and does not fit in the screen. It does not provide an user interface to maximize the window.

The user wants to view the report in PDF and in normal size so that it fits the screen normally. Is there a technique in SAP or a function module to achieve this.

Thanks and Regards,

Vamseedhar K

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jan 15, 2007 at 12:08 PM

    Hi,

    The function module is pritty simple and why not copy it and change the custom control on the screen to a more realistic size.

    I only found PDF preview programs related to smartforms that is so integrated to smartforms that you will not easily be able to use them in reports.

    Other option download to the users temp_directory and excecute Adobe like the code inserted.

    DATA: numbytes TYPE i,

    arc_idx LIKE toa_dara,

    p_file LIKE rlgrap-filename,

    cancel.

    w_return = sy-uname.

    CALL FUNCTION 'GUI_GET_DESKTOP_INFO'

    EXPORTING

    type = '12'

    CHANGING

    return = w_return.

    CONDENSE w_return.

    CONCATENATE w_return '\my_file.PDF'

    INTO p_file.

    CALL FUNCTION 'CONVERT_OTF_2_PDF'

    EXPORTING

    archive_index = arc_idx

    IMPORTING

    bin_filesize = numbytes

    TABLES

    otf = t_otfdata

    doctab_archive = doctab_archive

    lines = lines

    EXCEPTIONS

    err_conv_not_possible = 1.

    DATA: filename TYPE string.

    filename = p_file.

    CALL FUNCTION 'GUI_DOWNLOAD'

    EXPORTING

    bin_filesize = numbytes

    filename = filename

    filetype = 'BIN'

    IMPORTING

    filelength = numbytes

    TABLES

    data_tab = lines

    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.

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ELSE.

    WRITE: / 'The file ', p_file, ' has been created on your Desktop.'.

    ENDIF.

    call function 'WS_EXECUTE'

    exporting

    commandline =

    'C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe'

    program = filename

    exceptions

    frontend_error = 1

    no_batch = 2

    prog_not_found = 3

    illegal_option = 4

    gui_refuse_execute = 5

    others = 6.

    Regards,

    Marius

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.