add_button

Use this method to add a pushbutton to a form.

For further information, refer to Using Pushbuttons.

CALL METHOD valid_reference->add_button
          EXPORTING label    = label
                    sap_icon = sap_icon
                    tooltip  = tooltip
                    name     = name
          IMPORTING button   = button.

Parameter and Type

Opt.

Description

label
TYPE STRING

X

The text to appear on the pushbutton

sap_icon
TYPE ICONNAME

X

The name of an SAP icon that you want to appear on the pushbutton (in the form ICON_* )

tooltip
TYPE STRING

X

The tooltip for the button. This appears whenever the mouse pointer is positioned over the button

name
TYPE SDYDO_ELEMENT_NAME

X

The name of the button (you can assign it any name). You can address this name in the event handler method for the button as sender->name .

button
TYPE REF TO
CL_DD_BUTTON_
ELEMENT

 

An object reference that points to the button you have just created. You need this reference to register events for the button