Entering content frameProcess documentation Using the Document Viewer Locate the document in its SAP Library structure

Purpose

Use the Document Viewer when you want to allow the user to display a document but not change it.

In the SAPGUI for HTML, the Document Viewer is the only available variant of SAP Desktop Office Integration.

Prerequisites

In order to use the Document Viewer, you should be familiar with Structure link ABAP Objects and the concept of Structure link SAP Container Controls.

Process Flow

Example

For an extract of the required ABAP coding, see the Coding Example.

 

  1. You declare reference variables for a SAP Container (which will accommodate the Document Viewer) and the Document Viewer instance itself.
  2. You instantiate the SAP Container Control in the normal way, and get a reference to the Document Viewer using the method C_OI_CONTAINER_CONTROL_CONTAINER=>GET_DOCUMENT_VIEWER .
  3. This method returns a reference to an instance of the Document Viewer. From now on, you work with the methods of this instance.

  4. You start the viewer instance using the instance method INIT_VIEWER.
  5. You load the document into the Document Viewer using either VIEW_DOCUMENT_FROM_URL or VIEW_DOCUMENT_FROM_TABLE.
  6. You close the document using the CLOSE_DOCUMENT method.
  7. Once you are finished with the Document Viewer instance, you destroy it using the DESTROY_VIEWER method.
Leaving content frame