Start of Content Area

Function documentationCONSTRUCTOR  Locate the document in its SAP Library structure

Use

The constructor creates, initializes, and positions the control.

Note

The 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.

Windows

HTML

Java

ü

!

ü

HTML GUI: The parameters filedrop_mode, wordwrap_mode, wordwrap_position und wordwrap_to_linebreak_mode are not supported.

Features

create object textedit

  exporting
    parent = parent
    lifetime = lifetime
    max_number_chars = max_number_chars
    style = style
    filedrop_mode = filedrop_mode
    wordwrap_mode = wordwrap_mode
    wordwrap_position = wordwrap_position
    wordwrap_to_linebreak_mode = wordwrap_to_linebreak_mode

  exceptions
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    gui_type_not_supported = 5.

Parameter

Description

Possible values

parent

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

 

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.

max_number_chars

Sets the maximum number of characters that can be entered in the control

 

style

Controls the appearance and behavior of the control

Note

Constants from the class CL_GUI_CONTROL that begin with WS_* You can combine styles by adding the constants together. The default value sets a suitable combination of style constants internally.

filedrop_mode

Parameter controlling drag and drop behavior

dropfile_event_off
Only a file that replaces the full existing text can be used (default value).

dropfile_event_single
Only one file can be used. The file is not included in the editor.
The file drop event is triggered instead. You can specify the path of the dropped file using the method GET_PATH_OF_DROPPED_FILES.

dropfile_event_multiple
You can use more than one file. The file is not included in the editor. The file drop event is triggered instead. You can specify a list of the paths of the dropped files using the method GET_PATH_OF_DROPPED_FILES.

wordwrap_mode

Line break behavior

wordwrap_off
No line break

wordwrap_at_windowborder
Line break at the edge of the window (default value)

wordwrap_at_fixed_position
Line break at a fixed position

wordwrap_position

If wordwrap_mode = textedit->wordwrap_at_fixed_position: Position for the automatic line break in a line

Default value: -1

wordwrap_to_linebreak_mode

Converts soft line breaks to hard ones when you save in the SAP System

false
Soft line breaks are ignored when you save

true
Soft line breaks are converted to hard breaks when you save

Note

The advantage of using containers is that you can set certain essential display attributes (position on the screen, behavior when the window is resized, and so on) when you create them. If you do not use a container, you must set all of the attributes by hand, using the method SET_WINDOW_PROPERTY.

 

End of Content Area