Create a custom Screen and use an ALV-Container.
Using CL_GUI_TEXTEDITOR and its Methods you can prepare for the Visualization of the Screen ...
Then, just call the screen ...
Below is a sample that should work more or less :
"LongText Data in TextEditor ... CREATE OBJECT txteditor "CL_GUI_TEXTEDITOR EXPORTING wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position wordwrap_position = 132 wordwrap_to_linebreak_mode = cl_gui_textedit=>false parent = lr_container_txt "CL_GUI_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. IF sy-subrc <> 0. "Do Excp.Handling ENDIF. txteditor->set_text_as_stream( EXPORTING text = longtexttab "TDLINE-TABLE EXCEPTIONS error_dp = 1 error_dp_create = 2 OTHERS = 3 ). IF sy-subrc <> 0. "Do Excp.Handling ENDIF. txteditor->set_toolbar_mode( EXPORTING toolbar_mode = 0 "No Toolbar EXCEPTIONS error_cntl_call_method = 1 invalid_parameter = 2 OTHERS = 3 ). IF sy-subrc <> 0. "Do Excp.Handling ENDIF. "Possibly Update StatusBar Text ... txteditor->set_status_text( EXPORTING status_text = lv_status_txt EXCEPTIONS error_cntl_call_method = 1 OTHERS = 2 ). IF sy-subrc <> 0. "Do Excp.Handling ENDIF. "Call your Custom Screen CALL SCREEN 1001. PROCESS BEFORE OUTPUT. MODULE status_1001. MODULE status_1001 OUTPUT. SET PF-STATUS 'ZSTATUS'. SET TITLEBAR 'ZTITLE' WITH text-t01. txteditor->set_readonly_mode( EXPORTING readonly_mode = cl_gui_textedit=>true "ReadOnly EXCEPTIONS error_cntl_call_method = 1 invalid_parameter = 2 OTHERS = 3 ). IF sy-subrc <> 0. "Do Excp.Handling RETURN. ENDIF. ENDMODULE.
Hope this helps
Nic T.
Hi,
SAPscript: Edit text in the text editor
This function module is used to call the fullscreen editor. The lines of text can be edited with the functions available there. The editor interface is set according to the interface assigned to the text object.
When you exit the editor, the function module SAVE_TEXT is generally called implicitly with the function 'Save' or 'Flag', as long as the text is saved in the text file according to the text object set. This call can be deactivated via the parameter SAVE.
and there is one more FM TERM_CONTROL_EDIT
thanks!!
Add comment