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

multiple lines in screen painter

Former Member
0 Likes
5,665

hi All,

How can i enable multi lines entry in screen painter ?

I have a sigle line text right now but user wants ability to enter multiple line since single lines dont suffice their requirement

tahnks

AJ

7 REPLIES 7
Read only

Former Member
0 Likes
2,646

Hi Ashish,

Create a Text Box in screen painter and in the properties of the text box, we have an option to enable Multiple line entry. The option is called "Scrollable". You would find it just below the option Dropdown. You need to check that option.

Best Regards,

Ram.

Edited by: ram Kumar on Jan 20, 2009 4:15 PM

Edited by: ram Kumar on Jan 20, 2009 4:15 PM

Read only

0 Likes
2,646

thanks Ram that almost solves my problem but the user requires to see all the text he/she enters, which means i have to make the text box bigger, and not just a single line size.

Can you help please

Read only

0 Likes
2,646

Hi Ashsih,

Please verify the above given thread.

Best Regards,

Ram.

Read only

Former Member
0 Likes
2,646

Hi Ashish,

I tried the steps that i had given and i think it is not possible.

So searched in sdn and found a link that might be useful for your requirement. Kindly check this.

Link: []

Best Regards,

Ram.

Read only

Former Member
2,646

Hi Ashish.

If u want multiple line in screen u can go for container (implimenting text edit control).this is oops concept if u are intrested i can share u sample program of this.

regards,

Raghu

Read only

0 Likes
2,646

thanks Raghu , that will be very helpful.

Read only

0 Likes
2,646

Hi Ashish,

Example 1: Creating the TextEdit control

This is a simple example of how to implement a text edit control.

Steps

1. Create a report

2. In the start of selection event add: SET SCREEN '100'.

3. Create screen 100

4. Place a custom control on the screen by choosing the custom control icon which can be recognized by the letter 'C', and give it the name MYCONTAINER1.

5. To be able to exit the program, add a pushbutton with the function code EXIT.

6. In the elements list enter the name OK_CODE for the element of type OK.

The code

REPORT sapmz_hf_controls1 .

CONSTANTS:

line_length TYPE i VALUE 254.

DATA: ok_code LIKE sy-ucomm.

DATA:

  • Create reference to the custom container

custom_container TYPE REF TO cl_gui_custom_container,

  • Create reference to the TextEdit control

editor TYPE REF TO cl_gui_textedit,

repid LIKE sy-repid.

START-OF-SELECTION.

SET SCREEN '100'.

----


  • MODULE USER_COMMAND_0100 INPUT *

----


MODULE user_command_0100 INPUT.

CASE ok_code.

WHEN 'EXIT'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE. " USER_COMMAND_0100 INPUT

&----


*& Module STATUS_0100 OUTPUT

&----


MODULE status_0100 OUTPUT.

  • The TextEdit control should only be initialized the first time the

  • PBO module executes

IF editor IS INITIAL.

repid = sy-repid.

  • Create obejct for custom container

CREATE OBJECT custom_container

EXPORTING

container_name = 'MYCONTAINER1'

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

others = 6

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

  • Create obejct for the TextEditor control

CREATE OBJECT editor

EXPORTING

wordwrap_mode =

cl_gui_textedit=>wordwrap_at_fixed_position

wordwrap_position = line_length

wordwrap_to_linebreak_mode = cl_gui_textedit=>true

parent = custom_container

EXCEPTIONS

error_cntl_create = 1

error_cntl_init = 2

error_cntl_link = 3

error_dp_create = 4

gui_type_not_supported = 5

others = 6

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDIF.

ENDMODULE. " STATUS_0100 OUTPUT

The result

hope this will be helpfull.

Regards,

Raghu