Gyan Factory

Gyan Factory
SAP Technical Project Support

Thursday, December 31, 2015

Creating a text editor in using class - CL_GUI_TEXTEDIT

DATA lr_custom_cont TYPE REF TO cl_gui_custom_container,
           lr_text_edit TYPE REF TO cl_gui_textedit.

START-OF-SELECTION.
  CALL SCREEN 0001.

*----------------------------------------------------------------------*
*  MODULE create_container OUTPUT
*----------------------------------------------------------------------*
MODULE create_container OUTPUT.
  CREATE OBJECT lr_custom_cont
    EXPORTING
      container_name 'EDITOR' " Name of the Screen CustCtrl
      repid          sy-repid
      dynnr          sy-dynnr.

ENDMODULE.                    "create_container OUTPUT

*----------------------------------------------------------------------*
*  MODULE create_text_editor OUTPUT
*----------------------------------------------------------------------*
MODULE create_text_editor OUTPUT.

  CREATE OBJECT lr_text_edit
    EXPORTING
      parent lr_custom_cont.     " Parent Container


ENDMODULE.                    "create_text_editor OUTPUT 


------------------------------------------------------------------------------------------------------------------------------------------------
Step1. Here is the code.


Step2. Screen flow logic.

Step3. Screen layout and adding a custom container to it.


 Step 4. Run the above program and here we have an editor.


No comments:

Post a Comment