Creating a Dynamic Document

Prerequisites

In order to work with Dynamic Documents, you should be familiar with the basic concepts of SAP Container Controls and ABAP Objects.

In order to display the document, you need one of the following:

  • A reserved Custom Control area on a screen in your program
  • An instance of any SAP Container control
  • An existing instance of the SAP HTML Viewer

Process Flow

  1. In the data declarations in your program, declare a reference variable for the dynamic document.
  1. Instantiate the object using the CREATE OBJECT statement.
  2. Add display elements to the document by calling methods of your dynamic document instance. For further information, refer to Adding Simple Elements to a Dynamic Document and Adding Complex Elements to a Dynamic Document.
  3. When you have finished constructing the document, you need to merge the individual element instructions into a single document using the merge_document method.
  1. To display the document, use the display_document method.

For details about the different options for displaying a document, refer to Displaying a Dynamic Document.