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

Module pool

Former Member
0 Likes
582

Hi,

How to make a field(textbox) with more than one line

I want to enter a summary of more than two or three lines..

So anyone plz tell me how to give more than one line in the text box

5 REPLIES 5
Read only

Former Member
0 Likes
558

If you are looking at long text, use FM 'EDIT_TEXT'.

Read only

Former Member
0 Likes
558

Hi,

DATA:CONTAINER TYPE SCRFNAME VALUE 'CONT',<b>"create a contaqiner in screen with name 'CONT'</b>

CL_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,

TEXT_AREA TYPE REF TO CL_GUI_TEXTEDIT.

DATA:okcode type sy-ucomm.

set screen 101.

MODULE STATUS_POP_UP OUTPUT.

SET PF-STATUS 'MENU'.

  • SET TITLEBAR 'xxx'.

IF CL_CONTAINER IS NOT INITIAL.

CALL METHOD CL_CONTAINER->FREE

EXCEPTIONS

CNTL_SYSTEM_ERROR = 1

CNTL_ERROR = 2.

IF SY-SUBRC <> 0.

MESSAGE A000(ZTMW_MSGTAB).

ENDIF.

CLEAR CL_CONTAINER."clearing the custom container1

ENDIF.

IF CL_CONTAINER IS INITIAL.

CREATE OBJECT CL_CONTAINER

EXPORTING CONTAINER_NAME = CONTAINER.

CREATE OBJECT TEXT_AREA

EXPORTING

parent = CL_CONTAINER

wordwrap_mode = cl_gui_textedit=>WORDWRAP_AT_WINDOWBORDER

wordwrap_to_linebreak_mode = cl_gui_textedit=>true.

CALL METHOD CL_CONTAINER->link

EXPORTING

repid = sy-repid

dynnr = '0101'

container = CONTAINER.

CALL METHOD CL_CONTAINER->set_width

EXPORTING

width = 15.

CALL METHOD CL_CONTAINER->set_height

EXPORTING

height = 5.

ENDIF.

ENDMODULE.

MODULE EXIT_POP_UP INPUT.

CASE okcode.

WHEN 'EXIT'.

SET SCREEN 0.

ENDCASE.

ENDMODULE. " EXIT_POP_UP INPUT

<b>flow logic:</b>

PROCESS BEFORE OUTPUT.

MODULE STATUS_POP_UP.

*

PROCESS AFTER INPUT.

MODULE EXIT_POP_UP.

<b>reward if helpful</b>

rgds,

bharat.

Read only

0 Likes
558

We want to put this code in screen 0101 or 0100

Read only

0 Likes
558

In the case where the length of the test is fixed to say 2 lines.

Then just define separate fields , and combine them in your program.

Note : You have to concatenate them into one variable in PAI,

and also split them into two variables in PBO.

Read only

Former Member
0 Likes
558

Hello,

U can use the text symbols. Say for eg TEXT-001 Text-002 Text-003.

Data: str type string.

Concatenate TEXT-001 Text-002 Text-003 into str.

write:/ str.

Reaward points if it useful.

Regards,

anuj