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

problem with create object (cl_gui_textedit)

Former Member
0 Likes
863

I try to show some long text on screen, I create a custom container,a txteditot.The texteditor display correctly,but without any content of long text

DATA:

g_bill_text TYPE scrfname VALUE 'BILLING_TEXT',

g_text_container TYPE REF TO cl_gui_custom_container.

DATA: editor TYPE REF TO cl_gui_textedit.

CREATE OBJECT g_text_container

EXPORTING container_name = g_bill_text.

CREATE OBJECT editor

EXPORTING parent = g_text_container.

debug:

<b>g_text_container

editor </b>

LIFETIME I 4 2

PARENT r 8

CHILDREN h 8 Table[1x8]

1 LIFETIME I 4 2

2 PARENT r 8

3 M_AUTOREDRAW_REFCOUNTER I 4 0

4 M_AUTO_INDENT I 4 0

5 M_COMMENTS_STRING C 256

6 M_FILEDROP_MODE I 4 0

7 M_HIGHLIGHT_BREAKPOINTS_MODE I 4 0

8 M_HIGHLIGHT_COMMENTS_MODE I 4 0

9 M_LOCAL_CONTEXTMENU_MODE I 4 1

10 M_READONLY_MODE I 4 0

11 M_SPACES_ON_INDENT I 4 2

12 M_STATUSBAR_MODE I 4 1

CALL METHOD editor->get_selected_text_as_r3table

  • EXPORTING

  • only_when_modified = space

IMPORTING

<b> table = t_lines " this table have some lines</b>

  • is_modified =

EXCEPTIONS

OTHERS = 1.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
704

Hi , guys .....thank you very much.

and could you tell something about the memeory value.

g_text_container

editor

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
704

You must use the Set_text_as_r3table method, not get_selected_text_as_r3table

Regards,

RIch HEilman

Read only

manuel_bassani
Contributor
0 Likes
704

Hi,

Have a look at the example program SAPTEXTEDIT_DEMO_1.

the method get_text_as_r3table retrieves the text contained in the control, and fills your internal table.

use instead :


CALL METHOD editor->set_text_as_r3table
              EXPORTING table = t_lines.

Regards,

Manuel

Read only

Former Member
0 Likes
705

Hi , guys .....thank you very much.

and could you tell something about the memeory value.

g_text_container

editor

Read only

0 Likes
704

Hi,

those values are the references of the object you've just created. They mean that both g_text_container and editor are instantiated

(CLASS=CL_GUI_CUSTOM_CONTAINER is the type of the object g_text_container)

if you double click in debug mode in field , you will see the attributes (static, instance, public protected and private) of the object g_text_container.

Please remember to reward points for useful answers and to set the status answered if your problem is solved.

Thank you

Manuel