Skip to Content
0
Former Member
Oct 23, 2006 at 02:45 PM

long text . increase length from 72 char to 80 char per line

266 Views

Hi

I have a container in my modal dialg screen calling it from normal screen . i am able to input only 72 charcters per line.

is there way that i can inccrease it 80.

here is my code .

call screen '9910' starting at 6 6

ending at 60 18.

screen 9910

DATA : G_CONTAINER1 TYPE SCRFNAME VALUE 'TEXT_EDITOR1' ,

TEXT111 TYPE REF TO CL_GUI_TEXTEDIT ,

G_CUSTOM_CONTAINER1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER .

DATA : TEXTEDIT_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.

DATA : editor type ref to cl_gui_textedit.

CONSTANTS : line_length type i value 128.

TYPES : BEGIN OF my_table_struct_definition,

LINE(line_length) TYPE C,

END OF my_table_struct_definition,

MY_TABLE TYPE my_table_struct_definition OCCURS 0.

DATA : MYTABLE TYPE MY_TABLE.

if editor is initial.

CREATE OBJECT TEXTEDIT_CUSTOM_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 OBJECT EDITOR

EXPORTING

PARENT = TEXTEDIT_CUSTOM_CONTAINER

WORDWRAP_MODE = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION

WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>FALSE

EXCEPTIONS

OTHERS = 1.

refresh mytable.

CLEAR MYTABLE.

FREE MYTABLE.

endif.

IF SY-SUBRC NE 0.

CALL FUNCTION 'POPUP_TO_INFORM'

EXPORTING

TITEL = V_REPID "--> program name

TXT2 = SPACE

TXT1 = 'Error in flush'.

ENDIF.