You can use pushbuttons on forms to allow the user to choose different functions from a dynamic document. When the user clicks the pushbutton, an event is triggered. You must register a handler method for this event in your ABAP program.
You must already have created a dynamic document and added a form to it using theadd_form method.
Remember to include the special parametersender in the interface of the method. If you have more than one pushbutton in the dynamic document, you can use the attribute sender->name to identify which one the user actually chose.
The method returns an object reference to the button, which you should assign to the reference variable you declared in step 1.
By default, each element on a form is displayed on a separate line. However, it often makes sense to display a pushbutton on the same line as an associated input field. To do this, use the method
When the user clicks the pushbutton on the dynamic document, your handler method will be called.
In the handler method, you can access the attributes of all other elements on the form (for example, to find out the contents of an input field).