Application Development and Automation 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: 
Read only

Text area in screen using text Object.

former_member130219
Participant
0 Likes
390

Hi All

I want to use a text area in a container in a screen .

Kindly suggest me a step by step procedure to achieve this.

Thank you.

Regards.

Abhinandan Kumar

2 REPLIES 2
Read only

MarcinPciak
Active Contributor
0 Likes
362

Hi,

- create custom control on screen

- in PBO place there container

- inside container place instance of cl_gui_textedit

- use methods set_text_as_r3table and get_text_as_r3table to set and get dispalyed text respectively

code for reference



DATA: r_textedit TYPE REF TO cl_gui_textedit,
      r_cont     TYPE REF TO cl_gui_custom_container.

DATA: itab TYPE TABLE OF char255.

CALL SCREEN 100.

MODULE pbo OUTPUT.
  IF r_cont IS INITIAL.
    CREATE OBJECT r_cont
      EXPORTING
        container_name              = 'CUSTOM_CONTROL'.

    CREATE OBJECT r_textedit
      EXPORTING
        wordwrap_mode          = cl_gui_textedit=>wordwrap_at_fixed_position
        parent                 = r_cont.

  CALL METHOD r_textedit->set_text_as_r3table
    EXPORTING
      table = itab.

ENDMODULE.                    "pbo OUTPUT


MODULE pai INPUT.
  REFRESH itab.
  CALL METHOD r_textedit->get_text_as_r3table
    IMPORTING
      table = itab.
ENDMODULE.                    "pai INPUT

Regards

Marcin

Read only

former_member130219
Participant
0 Likes
362

Thank you it helped a lot.