This method is called by the control wrapper when you instantiate a control.
To instantiate a SAP control, always call the constructor of its class.
CREATE OBJECT my_control
EXPORTING clsid = clsid
lifetime = lifetime
shellstyle = shellstyle
parent = parent
name = name
autoalign = autoalign
EXCEPTIONS cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4.
Parameters |
Description |
clsid |
ID of the class |
lifetime |
Lifetime management parameter. The following values are permitted: my_control->lifetime_imode : The control remains alive for the duration of the internal session (that is, until the session is ended by one of the following statements: leave program. leave to transaction. set screen 0, leave screen. ). After this, the finalize method is called.my_control->lifetime_dynpro : The control remains alive for the lifetime of the screen instance, that is, for as long as the screen remains in the stack. After this, the free method is called.Using this mode automatically regulates the visibility of the control. Controls are only displayed when the screen on which they were created is active. When other screens are active, the controls are hidden. my_control->lifetime_default : If you create the control in a container, it inherits the lifetime of the container. If you do not create the control in a container (for example, because it is a container itself), the lifetime is set to my_control->lifetime_imode . |
Shellstyle |
Controls the appearance and behavior of the control You can pass any constants from the ABAP include < CTLDEF > that begin with WS. You can combine styles by adding the constants together. The default value sets a suitable combination of style constants internally. |
parent |
Container in which the SAP Picture Control can be displayed ( see also SAP Container). |
name |
Freely defined name for the control. You must specify a name if you are using a control in an Easy Web Transaction with no container. |
autoalign |
' ': Control is not automatically aligned 'X': Control is automatically aligned. This uses the maximum available space within a container. |