Displaying a Dynamic Document

Use

Once you have created and merged a dynamic document, you use the display_document method to display it on the screen.

Prerequisites

You must have created and merged the dynamic document itself.

Procedure

There are three possible ways to display a dynamic document:

Using a Custom Control Area on a Screen

  1. In the Screen Painter, place a Custom Control element on the screen and assign a name to it.
  2. When you call the display_document method, pass the name of your custom control to the CONTAINER parameter.

The system then creates an SAP Custom Container control in the container that you specified. It then creates an SAP HTML Viewer control in the container, and uses it to display your dynamic document.

Using an Existing SAP Container Control

To display your dynamic document in a container other than an SAP Custom Container (for example, in an SAP Docking Container or SAP Dialog Box Container):

  1. Create the container control in the usual way
  2. When you call the display_document method, pass the reference to the container to the PARENT parameter.

The system creates an SAP HTML Viewer control in the container that you specified, and uses it to display your dynamic document.

Reusing the Control From an Existing Dynamic Document

When you reuse a dynamic document instance (by initializing and refilling it), the HTML Viewer instance is not destroyed. Consequently, you can reuse it when you display your new document.

  1. Initialize your existing dynamic document using the initialize_document method.
  2. Fill and merge the dynamic document as normal
  3. When you call the display_document method, set the reuse_control parameter to 'X' .

See also:

display_document