Skip to Content

Display PDF inside a container


i have a Z-programm which has a selection screen on the left side. on the right side the result should be displayed as PDF in a HTML container element.


     CREATE OBJECT lo_docking_container


        repid     = sy-repid

        dynnr     = sy-dynnr

        side      = lo_docking_container->dock_at_right

        extension = 1200.

    CREATE OBJECT lo_html


        parent = lo_docking_container.




.programm logic for getting the PDF from a spool file.....







      type         = `application`

      subtype      = `pdf`


      assigned_url         = lv_url


      data_table           = lt_data


      dp_invalid_parameter = 1

      dp_error_general     = 2

      cntl_error           = 3

      OTHERS               = 4 ).

lo_html->show_url( url = lv_url in_place = 'X' ).

Now i have the problem that the PDF is NOT displayed inside the container element on the right side. it is empty after the "show_url", as it is at the init in the "AT SELECTION SCREEN OUTPUT". see screenshot:

So HOW can i get the PDF content into the right side container element ? It should be in the same dynpro as the selection screen is (standard dynpro 1000). what i am doing wrong here ? 😔

br Martin

Capture.PNG (26.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 28, 2015 at 08:08 PM

    have solved it on my own: i have created an dynpro and put the selection fields into that dynpro and then called the container. it seems that in "standard dynpro" 1000 with standard selection screen it is not possible to display the pdf in the container 😊

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 28, 2015 at 09:06 AM


    If you declared l_html as  CL_GUI_HTML_VIEWER then this should work well.

    If not you'll need to verify PDF association.

    If you launch SAPHTML_DEMO1  report and you put as URL a file reference like C:\test.pdf, you should see your content.

    If not, it's a PDF problem association and you'll have to check your workstation PDF program viewer association.

    If yes, then check in Debug Mode if URL is filled with value and if lt_data contain data.

    Hope to help


    Add comment
    10|10000 characters needed characters exceeded