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: 
Read only

Document Viewer: Show document inplace using "view_document_from_table"

Former Member
0 Likes
2,265

Hello,

i am trying to show a pdf-document on a dynpro using i_io_document_viewer.

As long as I don't activate "show_inplace", it works fine. The document is correctly shown in an external browser window. So the parameters i export seem to be allright. But when I set show_inplace='X' nothing happens - neigther the document is shown nor I get an error. I think my way to create the control and the container could be the problem...

Name of my Custom Control at the dynpro: CC_DOCUMENT

my_viewer TYPE REF TO i_oi_document_viewer

my_custom_container TYPE REF TO cl_gui_custom_container

Code:


    CALL METHOD c_oi_container_control=>get_document_viewer
      IMPORTING viewer = my_viewer.

    CREATE OBJECT my_custom_container
      EXPORTING container_name = 'CC_DOCUMENT'.

    CALL METHOD my_viewer->init_viewer
      EXPORTING parent = my_custom_container.

    CALL METHOD my_viewer->view_document_from_table
      EXPORTING show_inplace = 'X'      "With ' ' it works...but of couse NOT inplace :-(
              type = 'application'
              subtype = 'pdf'
              size = file_size
      CHANGING  document_table = file_table
    .

Does anybody see my mistake? I've been searching for hours -.-

Thank you for helping,

Best regards, margger

Edited by: margger on Mar 22, 2011 2:51 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,466

hI margger,

to see a pdf take a look to f.m.

HR_IT_DISPLAY_WITH_PDF.

It's very simple

Regards

Andrea

Hello,

i am trying to show a pdf-document on a dynpro using i_io_document_viewer.

As long as I don't activate "show_inplace", it works fine. The document is correctly shown in an external browser window. So the parameters i export seem to be allright. But when I set show_inplace='X' nothing happens - neigther the document is shown nor I get an error. I think my way to create the control and the container could be the problem...

Name of my Custom Control at the dynpro: CC_DOCUMENT

my_viewer TYPE REF TO i_oi_document_viewer

my_custom_container TYPE REF TO cl_gui_custom_container

Code:


    CALL METHOD c_oi_container_control=>get_document_viewer
      IMPORTING viewer = my_viewer.

    CREATE OBJECT my_custom_container
      EXPORTING container_name = 'CC_DOCUMENT'.

    CALL METHOD my_viewer->init_viewer
      EXPORTING parent = my_custom_container.

    CALL METHOD my_viewer->view_document_from_table
      EXPORTING show_inplace = 'X'      "With ' ' it works...but of couse NOT inplace :-(
              type = 'application'
              subtype = 'pdf'
              size = file_size
      CHANGING  document_table = file_table
    .

Does anybody see my mistake? I've been searching for hours -.-

Thank you for helping,

Best regards, margger

Edited by: margger on Mar 22, 2011 2:51 PM

3 REPLIES 3
Read only

Former Member
0 Likes
1,467

hI margger,

to see a pdf take a look to f.m.

HR_IT_DISPLAY_WITH_PDF.

It's very simple

Regards

Andrea

Read only

0 Likes
1,466

Hey Andrea,

thank you for your answer. The problem is that the .pdf is only a test file - later there will be images, movies, pdf-documents, ...

So the integration of the document viewer would be nice. And, like I said, showing the document works, but not embedded in my dynpro.

Regards,

margger

Read only

Former Member
0 Likes
1,466

Sorry, i found the problem. It was somewhere else. My container was killed in PBO after putting the document in.