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: 

An input/output box with a scrollable property

Former Member
0 Kudos

Hi,

Is it possible to have a Big scrollable input-output box. It should be like a text area

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

Look at class cl_gui_textedit

(1) Screen

In dynpro create a custom container, call it 'TEXTBOX' or so

(2) In program top, declare

DATA: container TYPE REF TO cl_gui_custom_container,
      editor TYPE REF TO cl_gui_textedit.

(3) in PBO

if editor is initial.

CREATE OBJECT: container EXPORTING container_name = 'TEXTBOX',

editor EXPORTING parent = container

wordwrap_mode = 2

wordwrap_position = 80

wordwrap_to_linebreak_mode = 1.

CALL METHOD editor->set_text_as_r3table

EXPORTING table = texttab.

ENDIF.

(4) in PAI

read the text

IF NOT init IS INITIAL.
      CALL METHOD editor->get_text_as_r3table
        IMPORTING table = texttab.

exit and release

      CALL METHOD editor->free.
      CALL METHOD container->free.
      CLEAR: editor, container.
ENDIF.

Look at <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCITEXTEDIT/BCCITEXTEDIT.pdf">SAP Textedit</a>

Regards

2 REPLIES 2

raymond_giuseppi
Active Contributor
0 Kudos

Look at class cl_gui_textedit

(1) Screen

In dynpro create a custom container, call it 'TEXTBOX' or so

(2) In program top, declare

DATA: container TYPE REF TO cl_gui_custom_container,
      editor TYPE REF TO cl_gui_textedit.

(3) in PBO

if editor is initial.

CREATE OBJECT: container EXPORTING container_name = 'TEXTBOX',

editor EXPORTING parent = container

wordwrap_mode = 2

wordwrap_position = 80

wordwrap_to_linebreak_mode = 1.

CALL METHOD editor->set_text_as_r3table

EXPORTING table = texttab.

ENDIF.

(4) in PAI

read the text

IF NOT init IS INITIAL.
      CALL METHOD editor->get_text_as_r3table
        IMPORTING table = texttab.

exit and release

      CALL METHOD editor->free.
      CALL METHOD container->free.
      CLEAR: editor, container.
ENDIF.

Look at <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCITEXTEDIT/BCCITEXTEDIT.pdf">SAP Textedit</a>

Regards

Former Member
0 Kudos