1. data를 선언해 준다.

 

TYPES pict_line(256) TYPE c.
DATA :init,
      container TYPE REF TO cl_gui_custom_container,
      editor TYPE REF TO cl_gui_textedit,
      picture TYPE REF TO cl_gui_picture,
      pict_tab TYPE TABLE OF pict_line,
      document_viewer TYPE REF TO i_oi_document_viewer.

DATA : url(1024)undefined  TYPE c.

 

2. PBO에 아래 소스 적용한다.


*&---------------------------------------------------------------------*
*&      Module  DOCUMENT_VIWER  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE DOCUMENT_VIWER OUTPUT.
*  IF init IS INITIAL.
*    init = 'X'.
  IF CONTAINER IS INITIAL.
    CALL METHOD C_OI_CONTAINER_CONTROL_CREATOR=>GET_DOCUMENT_VIEWER
      IMPORTING
        VIEWER = DOCUMENT_VIEWER.

    CREATE OBJECT CONTAINER
      EXPORTING
        CONTAINER_NAME = 'PICTURE_CONTAINER'.

    CALL METHOD DOCUMENT_VIEWER->INIT_VIEWER
      EXPORTING
        PARENT = CONTAINER.
  ENDIF.

  CALL METHOD DOCUMENT_VIEWER->VIEW_DOCUMENT_FROM_URL
    EXPORTING
      DOCUMENT_URL = URL     "orblk
      SHOW_INPLACE = 'X'.

*  CALL METHOD document_viewer->destroy_viewer.
*  CALL METHOD container->free.
*
*  FREE: document_viewer, container.
ENDMODULE.                 " DOCUMENT_VIWER  OUTPUT