Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
3,828

There is a long procedure to introduce a TextEditor control on a screen in Module Pool programming in ABAP.
But using the Function Module 'CATSXT_SIMPLE_TEXT_EDITOR'.
For implementing the editor on selection screen follow the steps below.

  1. Create a push button on selection screen with a user command.
  2. Create an icon and text for the Pushbutton using Function Module ‘ICON_CREATE’.
  3. On AT SELECTION-SCREEN use case statement to do the FCode processing for pushbutton user-command.
  4. Call Function Module 'CATSXT_SIMPLE_TEXT_EDITOR' and give the text table to get the content of the editor.

A simple report to explain the above:
TABLES:
  sscrfields.
TYPE-POOLS icon.
DATA :  li_txline  TYPE STANDARD TABLE OF txline.SELECTION-SCREEN: PUSHBUTTON 33(35) ebtn USER-COMMAND editor
                                         MODIF
ID g1
                                         VISIBLE LENGTH
25.
INITIALIZATION.

 
CALL FUNCTION 'ICON_CREATE'
   
EXPORTING
      name  
= icon_msg
     
text   = text-020
      info  
= 'Editor'
   
IMPORTING
      RESULT
= ebtn
   
EXCEPTIONS
     
OTHERS = 0.
AT SELECTION-SCREEN.
 
CASE sscrfields.
   
WHEN 'EDITOR'.
     
CALL FUNCTION 'CATSXT_SIMPLE_TEXT_EDITOR'
       
EXPORTING
          im_title       
= text-020
          im_display_mode
= space
       
CHANGING
          ch_text        
= li_txline[].
   
WHEN OTHERS.
 
ENDCASE.

Output of the above report: