| Home • Tips • Tutorials • Sample Specs • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
Email a FriendWhat's New?
Contribute?What's Hot? |
Text Edit control - Usage and DemoBy Saikumar Bonakurthi, Enteg Infotech As an ABAP developer, we all know that if we drop a field
of type char and length 255 in to the conventional screen painter it will be
displayed in a single line. It will not be good interface unless we provide a
multi-line input field in the screen. This can be achieved by text editor
control. The following is our attempt to explain how to implement the
text editor control on classic dynpros. 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. Our declaration part contains
DATA: LINE_LENGTH TYPE I VALUE 254, Then call the screen (can be any number) START-OF-SELECTION. Go to screen 100 by double clicking on '100'. Create a custom control on screen with name TEXTEDIT.
Uncomment both PBO and PAI modules in flow logic screen PROCESS BEFORE OUTPUT. 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. CREATE OBJECT EDITOR_CONTAINER You can hide the toolbar and as well as status bar for
the text editor control. CALL METHOD TEXT_EDITOR->SET_TOOLBAR_MODE Define and create a GUI Status in the PBO. SET PF-STATUS 'STATUS_0100'. Very minimum set of tool bar buttons defined in this
example
In PAI of the screen 100, handle the save and other user
commands. CASE SY-UCOMM. To read the text that is typed in the editor we need to
call the method GET_TEXTSTREAM of the editor instance. We are just displaying the text typed in the editor in an
informative message; the same can be inserted / updated into a database table
also. The complete coding of the executable program is given
below.. REPORT ZTEXT_EDITOR. The final Screen shot of the editor:
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM,
Inc. is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||