Creating a Form


Using a form in a dynamic document allows you to use interactive elements that are not allowed in the main document, namely

  • input fields
  • pushbuttons
  • dropdown list boxes


In order to create a form, you must already have instantiated a dynamic document. You must also declare a reference variable with the type cl_dd_form_area .

Process Flow

  1. Call the method add_form for your main document. This inserts a form area into the document and returns an object reference to it.
  2. Fill the form by calling the methods of the object returned in step 1. It may contain all of the display elements that you can use in a main document. In addition, it may contain the following elements that are only allowed on forms:

To insert this element

Use method

See also



Using Pushbuttons

Input field


Using Input Fields

Dropdown list box


Using Dropdown List Boxes

  1. When you have finished creating both your form area and the main document, use the merge_document method of the main document instance to include the form in the main document.


Do not nest forms, since the results can be unpredictable.