Displaying a Dynamic Document
Use
Once you have created and merged it with the method merge_document into the document, you use the display_document method to display it on the screen.
Prerequisites
You must have created and merged the dynamic document itself using method merge_document.
Procedure
There are three possible ways to display a dynamic document:
Using a Custom Control Area on a Screen
-
In the Screen Painter, place a Custom Control element on the screen and assign a name to it.
-
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):
-
Create the container control in the usual way.
-
When you call the display_document method, pass the reference to the container to the PARENT parameter.
It then creates an SAP HTML Viewer control in the container, 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.
-
Initialize your existing dynamic document using the initialize_document method.
-
Fill the dynamic document and include the document element with method merge_document.
-
When you call the display_document method, set the reuse_control parameter to 'X'.