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 box on selection screen

Former Member
0 Likes
967

Can any one tell me how can I create a Multiple line Text box on a selection screen, similar to a Address writing box or "Post Comment" box available on various websites.

Thanks

Gopal

3 REPLIES 3
Read only

Former Member
0 Likes
468

Hi,

use the folllowing code logic :


REPORT  sy-repid.

DATA : g_container TYPE REF TO cl_gui_custom_container.
DATA : g_editor    TYPE REF TO cl_gui_textedit.

TYPES: BEGIN OF x_texttable,
  line_length(255) TYPE c,
END OF x_texttable.

DATA : g_t_text TYPE TABLE OF x_texttable.

DATA : g_wa_text TYPE x_texttable.

DATA : ok_code TYPE sy-ucomm.

START-OF-SELECTION.
  CALL SCREEN 100.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.

  IF g_editor IS INITIAL.
    CREATE OBJECT g_container
      EXPORTING
        container_name         = 'G_CUSTOM'.

    CREATE OBJECT g_editor
      EXPORTING
        parent                 = g_container.
  ENDIF.

ENDMODULE.                 " STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
  CASE ok_code.
    WHEN 'SAVE'.
      CALL METHOD g_editor->get_text_as_r3table
        IMPORTING
          table           = g_t_text
        EXCEPTIONS
          error_dp        = 1
          error_dp_create = 2
          OTHERS          = 3.

  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0100  INPUT

Regards,

Mansi.

Read only

Former Member
0 Likes
468

Hi ..

To do so we need to work on Dialog programing..

Regards,

sg.

Read only

Former Member
0 Likes
468

Hi

You need to create a text editor control to enter multiline comments using class CL_GUI_TEXTEDIT.

Search SDN for text editor to get detailed solution.

Thanks

Vishal Kapoor