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: 

show text editor

Former Member
0 Kudos

is it possible to show a text editor in a container?

8 REPLIES 8

awin_prabhu
Active Contributor
0 Kudos

Hi,

S u can do it.

Check below code. In screen 200 create a custom control with name 'TEXT_EDIT'.

REPORT ZPARA1.

DATA: ok_code TYPE sy-ucomm.

CLASS cl_gui_cfw DEFINITION LOAD.

DATA: obj_custom_container TYPE REF TO cl_gui_custom_container,

obj_textedit TYPE REF TO cl_gui_textedit.

call screen 200.

MODULE status_0200 OUTPUT. " PBO module of screen 200

IF obj_custom_container IS INITIAL.

CREATE OBJECT obj_custom_container

EXPORTING

container_name = 'TEXT_EDIT' " Custom control name in screen 200

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

OTHERS = 6.

CREATE OBJECT obj_textedit

EXPORTING

max_number_chars = 1000

parent = obj_custom_container

EXCEPTIONS

error_cntl_create = 1

error_cntl_init = 2

error_cntl_link = 3

error_dp_create = 4

gui_type_not_supported = 5

OTHERS = 6.

ENDIF.

CALL METHOD obj_textedit->set_focus

EXPORTING

control = obj_textedit.

ENDMODULE.

Edited by: Sap Fan on Sep 9, 2009 2:27 PM

0 Kudos

Hello SAP Fan,

thank you for your reply, can I load text from table stxh in the text editor which I have now in my container?

0 Kudos

I see that there is no possibility to switch to the new editor like I have it in office. How can I load the simular editor which I habe in the new editor?

0 Kudos

is it not possible to use something like the function edit_text which I can use in my container? in the function edit_text I have the possibility to use the new editor like word

0 Kudos

no ideas?

0 Kudos

is there no solutions how this can be solved?

0 Kudos

Hi

For loading text from internal table to text editor use below FM in PBO,

call method obj1_textedit->set_text_as_r3table

exporting

table = itab " <---- Ur internal table

exceptions

error_dp = 1

error_dp_create = 2.

Thanks,

0 Kudos

but this is not the "word" editor which I have with the fm edit_text or? I want to use the new front text editor in the container, is this not possible?