Application Development and Automation 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: 
Read only

get_text_as_stream

Former Member
0 Likes
2,002

Hi everybody,

I use cl_gui_textedit to create text-editor limited to 2000 characters, I save that the users write in the editor in a internal table with method get_text_as_stream. My internal table has lines of 250 characters, but that save is 75 characters. There is a way to increase the dimension of the lines from 75 to 250..?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,086

Hi Stefano,

Pls check the below simple program....

Here i am restricting it to 2000 chars and and entering 2000 chars..

I am getting 8 lines( 255 * 8 = 2040 ) in the table gt_table.

PARAMETER dummy.

DATA : go_texteditor TYPE REF TO cl_gui_textedit,
       gt_table      TYPE STANDARD TABLE OF char255.

AT SELECTION-SCREEN OUTPUT.

  CREATE OBJECT go_texteditor
    EXPORTING
      max_number_chars = 2000
      parent           = cl_gui_container=>default_screen.

START-OF-SELECTION.

  go_texteditor->get_text_as_stream( IMPORTING text = gt_table ).

  BREAK-POINT.  " check gt_table

Cheers,

Jose.

2 REPLIES 2
Read only

Former Member
0 Likes
1,086

HI,

Check this demo program SAPSCRIPT_DEMO_NOTE_EDITOR

Read only

Former Member
0 Likes
1,087

Hi Stefano,

Pls check the below simple program....

Here i am restricting it to 2000 chars and and entering 2000 chars..

I am getting 8 lines( 255 * 8 = 2040 ) in the table gt_table.

PARAMETER dummy.

DATA : go_texteditor TYPE REF TO cl_gui_textedit,
       gt_table      TYPE STANDARD TABLE OF char255.

AT SELECTION-SCREEN OUTPUT.

  CREATE OBJECT go_texteditor
    EXPORTING
      max_number_chars = 2000
      parent           = cl_gui_container=>default_screen.

START-OF-SELECTION.

  go_texteditor->get_text_as_stream( IMPORTING text = gt_table ).

  BREAK-POINT.  " check gt_table

Cheers,

Jose.