Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

multi line text field ..

naveenvishal
Contributor
0 Kudos

how to insert multi line text field into dialog module

thanx

Edited by: NAVEEN VISHAL on Feb 11, 2008 5:05 PM

1 ACCEPTED SOLUTION

soumya_jose3
Active Contributor
0 Kudos

Hi,

First of all create a custom control with name TEXTEDITOR1.

In the TOP Include declare as follows:

CONSTANTS: line_length TYPE i VALUE 25.

DATA:

  • reference to wrapper class of control

g_editor TYPE REF TO cl_gui_textedit,

  • reference to custom container: necessary to bind TextEdit Control

g_editor_container TYPE REF TO cl_gui_custom_container.

In the PBO module code as follows:

  • create control container

CREATE OBJECT g_editor_container

EXPORTING

container_name = 'TEXTEDITOR1'

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5.

IF sy-subrc NE 0.

  • add your handling

ENDIF.

  • create calls constructor, which initializes, creats and links

  • TextEdit Control

CREATE OBJECT g_editor

EXPORTING

parent = g_editor_container

wordwrap_mode =

  • cl_gui_textedit=>wordwrap_off

cl_gui_textedit=>wordwrap_at_fixed_position

  • cl_gui_textedit=>WORDWRAP_AT_WINDOWBORDER

wordwrap_position = line_length

wordwrap_to_linebreak_mode = cl_gui_textedit=>true.

CALL METHOD g_editor->set_toolbar_mode

EXPORTING

toolbar_mode = cl_gui_textedit=>false.

CALL METHOD g_editor->set_statusbar_mode

EXPORTING

statusbar_mode = cl_gui_textedit=>false.

This will give you a multiline text box.

Regards,

Soumya.

3 REPLIES 3

Former Member
0 Kudos

Hi,

This can be achieved through TEXT EDIT control in dialog proramming,

Search SDN , you can get lot of blogs for TEXT EDIT CONTROL.

Regards,

Raghavendra

Former Member
0 Kudos

Hi,

Use modal dialogue window. Create one using SE35.

Attach one multi line text field to it.

Take the text from the dialog window into a table back into the method from which you call this window.

Reward if helpful.

soumya_jose3
Active Contributor
0 Kudos

Hi,

First of all create a custom control with name TEXTEDITOR1.

In the TOP Include declare as follows:

CONSTANTS: line_length TYPE i VALUE 25.

DATA:

  • reference to wrapper class of control

g_editor TYPE REF TO cl_gui_textedit,

  • reference to custom container: necessary to bind TextEdit Control

g_editor_container TYPE REF TO cl_gui_custom_container.

In the PBO module code as follows:

  • create control container

CREATE OBJECT g_editor_container

EXPORTING

container_name = 'TEXTEDITOR1'

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5.

IF sy-subrc NE 0.

  • add your handling

ENDIF.

  • create calls constructor, which initializes, creats and links

  • TextEdit Control

CREATE OBJECT g_editor

EXPORTING

parent = g_editor_container

wordwrap_mode =

  • cl_gui_textedit=>wordwrap_off

cl_gui_textedit=>wordwrap_at_fixed_position

  • cl_gui_textedit=>WORDWRAP_AT_WINDOWBORDER

wordwrap_position = line_length

wordwrap_to_linebreak_mode = cl_gui_textedit=>true.

CALL METHOD g_editor->set_toolbar_mode

EXPORTING

toolbar_mode = cl_gui_textedit=>false.

CALL METHOD g_editor->set_statusbar_mode

EXPORTING

statusbar_mode = cl_gui_textedit=>false.

This will give you a multiline text box.

Regards,

Soumya.