‎2009 Sep 29 8:27 AM
Hi all,
I am working on one module pool program
.in that i have one text field need to enter some comments of length 250.
I want to enter more than one line in that text field,instead of entering it in a single field.Anybody please help how to do that.Is there any other option other than custom control?
Thanks in advance
Ambili
‎2009 Sep 29 1:44 PM
Hi Ambili Balakrishnan,
You can use class CL_GUI_TEXTEDIT for your purpose..
Define custome container and call the object of the above class...
For more information search on SCN with subject as above class...
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya
‎2009 Sep 29 1:29 PM
Hi,
Instead of capturing the 250 lines of comment using custom control or label, you can directly store the long text in STXH table. To create a long text CREATE_TEXT can be used, where as to edit an existing text EDIT_TEXT and to display READ_TEXT can be used. These FMs can be called from the module pool on a button click.
Each longtext can be identified by a unique name passed to TDNAME. It'll call the SAP Scripts Text Editor automatically and no text formatting also needs to be done.
Please let me know for furher details and the code.
‎2009 Sep 29 1:33 PM
Refer this snippet:
DATA: it_str TYPE TABLE OF char72.
CALL SCREEN 100.
MODULE pbo_0100 OUTPUT.
SET PF-STATUS space.
CALL FUNCTION 'RH_EDITOR_SET'
EXPORTING
repid = sy-repid
dynnr = '0100'
controlname = 'CONTAINER'
max_cols = 72
max_lines = 20
TABLES
lines = it_str.
ENDMODULE.
MODULE pai_0100 INPUT.
IF sy-ucomm = 'BACK' OR
sy-ucomm = '%EX' OR
sy-ucomm = 'RW'.
LEAVE TO SCREEN 0.
ENDIF.
CALL FUNCTION 'RH_EDITOR_GET'
EXPORTING
controlname = 'CONTAINER'
col_width = 72
TABLES
lines = it_str.
ENDMODULE.
Regards
Marcin
‎2009 Sep 29 1:44 PM
Hi Ambili Balakrishnan,
You can use class CL_GUI_TEXTEDIT for your purpose..
Define custome container and call the object of the above class...
For more information search on SCN with subject as above class...
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya