Hello Gurus....
I have a requirment to give two editor on the screen.
I have used the the fowwloing code in my prog for editor...
but after running this for both Internal table I am getting same value of 2 container.
Can you please tell me howto get first containr value in 1 TTAB
and 2 container value in 2 ITAb.
My code for your ref.....
create control container
create object g_editor_container
exporting
container_name = 'TEXTEDITOR1'
if sy-subrc ne 0.
add your handling
endif.
g_mycontainer = 'TEXTEDITOR1'.
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.
to handle different containers
g_container_linked = 1.
refresh g_mytable. " to initialize table upon OK_CODE 'BACK' at PAI
*======================================================================
create control container
create object g_editor_container
exporting
container_name = 'TEXTEDITOR2'
if sy-subrc ne 0.
add your handling
endif.
g_mycontainer = 'TEXTEDITOR2'.
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.
to handle different containers
g_container_linked = 1.
refresh g_mytable1. " to initialize table upon OK_CODE 'BACK' at PAI
endif.
endmodule. " STATUS_1000 OUTPUT
&----
*& Module USER_COMMAND_1000 INPUT
&----
text
----
module USER_COMMAND_1000 input.
case SY-UCOMM.
when 'EXIT'.
perform exit_program.
when 'SAVE'.
retrieve table from control
call method g_editor->get_text_as_r3table
importing table = g_mytable.
call method cl_gui_cfw=>flush
exceptions
others = 1.
if sy-subrc ne 0.
endif.
call method g_editor->get_text_as_r3table
importing table = g_mytable1.
call method cl_gui_cfw=>flush
exceptions
others = 1.
if sy-subrc ne 0.
endif.
endcase.
endmodule. " USER_COMMAND_1000 INPUT