Application Development 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: 

How to use class CL_GUI_PDFVIEWER to show a pdf

former_member666258
Participant
0 Kudos

Hello i'm triying to show a pdf from al11 so i get my pdf like this:

form visualizar_pdf .
  data: gt_pdfout type solix_tab,
        gs_pdfout type solix.
  constants p_file type string value '/funcional/recepcion_contingencia/peru/proc_correctamente/20100057523_1_f010_12209.pdf'.
  open dataset p_file for input in binary mode.

  do.
    read dataset p_file into gs_pdfout-line.
    if sy-subrc ne 0.
      exit.
    endif.
    append gs_pdfout to gt_pdfout.
  enddo.

  close dataset p_file.
" after this i need to show my pdf
endform

But i don't know how to use this class to create a html container to show my pdf, and this html container how can i clean it ?

3 REPLIES 3

mateuszadamus
Active Contributor

Hello naoto_a

Please use your favorite browser before creating new threads.

Here is an example: https://answers.sap.com/questions/1415422/clguipdfviewer.html

Here is another one: http://www.sapfans.com/forums/viewtopic.php?t=255860

Kind regards,

Mateusz

0 Kudos

I had already seen those posts but when they use CALL METHOD pdf->open_document how can i use this if i alrady have my pdf in other table ? and they read it from the local pc

0 Kudos

Hello naoto_a

In this case maybe this solution will suit your needs: "instead of pdf viewer , use cl_gui_html_viewer.".

More details in this answer: https://answers.sap.com/answers/2501201/view.html

If not, please elaborate on the issue. Describe what you want to do in more details.

Kind regards,
Mateusz