Start of Content Area

Function documentationCONSTRUCTOR  Locate the document in its SAP Library structure

Use

The constructor creates, initializes, and positions the control.

NoteThe constructor method is called automatically when you instantiate the class ( create object statement). You generally pass the parameters of the method in the create object statement. Since the SAP Container is a superclass, its constructor is called indirectly when the constructor method of one of its subclasses is called.

Features

create object container

  exporting
    clsid = clsid
    parent = parent
    style = style
    dynnr = dynnr
    repid = repid
    container_name = container_name
    lifetime = lifetime
    autoalign = autoalign
    no_autodef_progid_dynnr = no_autodef_progid_dynnr

  exceptions
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    lifetime_dynpro_illegal_parent = 6.

Parameters

Description

Possible values

clsid

Class ID

 

parent

Parent of the instance, that is, the contain in which the control is to be displayed

 

style

Controls the appearance and behavior of the control

Constants from the class CL_GUI_CONTROL that begin with WS_*

dynnr

Number of the screen to which you want to attach the control

 

repid

Report ID: Program to which you want to attach the control

 

container_name

Name of the Custom Container defined in the Screen Painter

 

lifetime

Lifetime management parameter specifying the lifetime of the control

cntl_lifetime_imode :
The control remains alive for the lifetime of the internal session (that is, until a statement such as
leave program or leave to transaction ).

cntl_lifetime_dynpro : The control remains alive for the lifetime of the screen (that is, while it remains in the screen stack). It is not destroyed, for example, by a call screen or call transaction statement.

autoalign

Automatic alignment of the container

Default: None

no_autodef_progid_dynnr

Switches off automatic definition of the program ID and screen number.

space
Program ID and screen number are used automatically (default value)

Switches off automatic definition of the program ID and screen number.