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

Regarding Text-Editor in Module pool programming

Former Member
0 Likes
565

Below is my code which I am displaying my text in text editor first time it is displaying and it is not clearing the first displayed text and also others values also not displaying please help me

CLEAR: wa_result.

  • CLEAR: w_container1, w_text_editor.

REFRESH it_texttab.

READ TABLE it_result INTO wa_result INDEX p_e_row_id.

SELECT * FROM zemp_dailyact_t

INTO TABLE it_zemp_dailyact_t WHERE empid = wa_result-empid

AND objid = wa_result-objid.

CLEAR wa_zemp_dailyact_t.

LOOP AT it_zemp_dailyact_t INTO wa_zemp_dailyact_t.

wa_texttab-line = wa_zemp_dailyact_t-rmrk_text.

APPEND wa_texttab TO it_texttab.

CLEAR : wa_texttab, wa_zemp_dailyact_t.

ENDLOOP.

CALL SCREEN 200.

  • CALL METHOD w_text_editor->DELETE_TEXT( ).

ENDFORM. " navigate_to_detail_view

&----


*& Module STATUS_0200 OUTPUT

&----


  • text

----


MODULE status_0200 OUTPUT.

SET PF-STATUS 'GUI200'.

SET TITLEBAR 'T02'.

  • CLEAR: w_container1, w_text_editor.

CHECK w_container1 IS NOT BOUND.

CREATE OBJECT w_container1 EXPORTING container_name = 'TEXT_EDITOR'.

CREATE OBJECT w_text_editor EXPORTING parent = w_container1

wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder.

***to put some text in the text editor.

CALL METHOD w_text_editor->set_text_as_r3table

EXPORTING

table = it_texttab " Contents of this table is displayed in text editor

EXCEPTIONS

error_dp = 1

error_dp_create = 2

OTHERS = 3.

IF sy-subrc EQ 0.

ENDIF.

CALL METHOD w_text_editor->set_readonly_mode( ).

ENDMODULE. " STATUS_0200 OUTPUT

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
511

hi ,

after set_text , use this two methods

CALL METHOD g_editor->set_first_visible_line .

CALL METHOD c_textedit_control=>flush.

Just try it out it may work.

regards

Raj

3 REPLIES 3
Read only

Former Member
0 Likes
512

hi ,

after set_text , use this two methods

CALL METHOD g_editor->set_first_visible_line .

CALL METHOD c_textedit_control=>flush.

Just try it out it may work.

regards

Raj

Read only

0 Likes
511

It is not working any other way

Read only

0 Likes
511

Hi,

Change this piece of code with the below code.....

CHECK w_container1 IS NOT BOUND.
CREATE OBJECT w_container1 EXPORTING container_name = 'TEXT_EDITOR'.
CREATE OBJECT w_text_editor EXPORTING parent = w_container1
wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder.

IF w_container1 IS NOT BOUND.
CREATE OBJECT w_container1 EXPORTING container_name = 'TEXT_EDITOR'.
CREATE OBJECT w_text_editor EXPORTING parent = w_container1
wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder.
ENDIF.

Cheers,

Jose