08-25-2006 3:50 PM
Hi All ,
I just want to put a Text box on my Selection screen
If my Text goes long I need to have it with Scroll Bars also .
I request your HElp.
Thanks in Advance.
PAVAN.
08-25-2006 3:58 PM
Try the FuBA POPUP_TO_CONFIRM
or an other POPUP_TO*
Ot use a list box.
08-25-2006 4:03 PM
08-25-2006 5:11 PM
Hi,
just declare a parameter of type c.
it acts as a textbox/input field.
parameters:a(150) type c."here it can hold upto 150 characters without scroll bars.
upto a max length of 65535 characters(permitted length of type c field) can be input.
Regards,
Sowjanya
08-25-2006 5:17 PM
Please see the following sample program. It implements a text editor box in a docking container atached to a selection screen. When the user presses execute, it retrieves the text and write it to list, there is also code there if you want to save to sapscript long text.
report zrich_0001.
data:
dockingleft type ref to cl_gui_docking_container,
text_editor type ref to cl_gui_textedit,
repid type syrepid.
data: begin of header.
include structure thead.
data: end of header.
data: begin of lines occurs 0.
include structure tline.
data: end of lines.
data: textlines type table of tline-tdline,
wa_text type tline-tdline.
parameters: p_check.
at selection-screen output.
repid = sy-repid.
create object dockingleft
exporting repid = repid
dynnr = sy-dynnr
side = dockingleft->dock_at_left
extension = 400.
create object text_editor
exporting
parent = dockingleft.
start-of-selection.
call method text_editor->get_text_as_r3table
importing
table = textlines
exceptions
others = 1.
loop at textlines into wa_text.
write:/ wa_text.
endloop.
* Save the text as SAPscript text
* clear header.
* header-tdname = '999999' . "Name
* header-tdobject = 'ZPT_DET'. "Object
* header-tdid = 'Z001'. "Id
* header-tdspras = sy-langu.
*
** Move text from container to function module table
* clear lines. refresh lines.
* loop at textlines into wa_text .
* lines-tdline = wa_text.
* append lines .
* endloop.
*
* call function 'SAVE_TEXT'
* exporting
* client = sy-mandt
* header = header
* tables
* lines = lines
* exceptions
* id = 1
* language = 2
* name = 3
* object = 4
* others = 5.
Regards,
Rich HEilman