This section lists the functions that are specific to the SAP HTML Viewer.
Prerequisites
The process described here is an extension of the
general process for using controls that is specific to the SAP HTML Viewer. It does not contain all of the steps required to produce a valid instance of the control.
Process Flow

The program extracts are examples that do not necessarily illustrate all of the features of the control. For precise information, refer to the reference section of this documentation.
Creating the Instance
DATA html_viewer TYPE REF TO cl_gui_html_viewer.
Create an instance of the SAP HTML Viewer:CREATE OBJECT html_viewer
EXPORTING parent = container.
Register the Events
Event name |
Meaning |
SAPEVENT |
Click on a special HTML link that triggers an SAP event |
NAVIGATE_COMPLETE |
HTML page fully loaded |
Using the SAP HTML Viewer
Load
HTML pages or parts of HTML pages. Display the loaded objects.Destroying the Control
The
lifetime management is normally responsible for destroying any controls you use. However, the following two steps allow you to destroy the control yourself:
Destroy the SAP HTML Viewer at the frontend. If you no longer need the control container, release it as well:
CALL METHOD html_viewer->free.
FREE html_viewer.

The program SAPHTML_EVENTS_DEMO shows how you can use the SAP HTML Viewer.