Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

About Text BOX

Former Member
0 Kudos

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.

4 REPLIES 4

Former Member
0 Kudos

Try the FuBA POPUP_TO_CONFIRM

or an other POPUP_TO*

Ot use a list box.

former_member181962
Active Contributor
0 Kudos

Refer the following threads:

Former Member
0 Kudos

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

0 Kudos

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