Posted: Fri May 18, 2012 2:31 pm Post subject: How to create text editor?
Example 1: use FM TXW_TEXTNOTE_EDIT
Code:
FORM note_display.
IF gt_note IS INITIAL. "no note
MESSAGE s069(xw).
ELSE.
CALL FUNCTION 'TXW_TEXTNOTE_EDIT'
EXPORTING
edit_mode = space
TABLES
t_txwnote = gt_note.
ENDIF.
ENDFORM. "note_display
Text editor is displayed on screen using custom control. So we need a container for the custom control. And text editor control is implemented using class CL_GUI_TEXTEDIT.
declaration part contains
DATA: LINE_LENGTH TYPE I VALUE 254,
EDITOR_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
TEXT_EDITOR TYPE REF TO CL_GUI_TEXTEDIT,
TEXT TYPE STRING.
Then call the screen (can be any number)
START-OF-SELECTION.
CALL SCREEN '100'.
Go to screen 100 by double clicking on '100'.
Create a custom control on screen with name TEXTEDITOR.
Uncomment both PBO and PAI modules in flow logic screen
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
Define and implement both the modules in the main program itself.
In PBO create object container EDITOR_CONTAINER. Then create text editor object by exporting the container EDITOR_CONTAINER.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.