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 in screen

Former Member
0 Likes
1,195

in MM03, sales area tab, you see a text box where in you can type as much as u want and the cursor automatically moves onto next line.

I wish to include such a textbox in my report. Pl. tell how to mitogate the same action in my report ?

Regards,

Tom Jerry.

in MM03, sales area tab, you see a text box where in you can type as much as u want and the cursor automatically moves onto next line.

I wish to include such a textbox in my report. Pl. tell how to mitogate the same action in my report ?

Regards,

Tom Jerry.

8 REPLIES 8
Read only

Former Member
0 Likes
1,077

Hi Tom,

Use the TextEditor functionality to get the desired field.

To save the text entered in the TextEditor, use FM "SAVE_TEXT' with the Unique text name and to retrieve the saved text,

use FM "READ_TEXT" with the same unique text name.

Hope it helps you.

Regards,

Amarnath S

Read only

0 Likes
1,077

Hi Amarnaths,

Pl. clarify what do u mean by TextEditor functionality ?

How to use the same in the module pool.

Regards,

Tom Jerry.

Read only

Former Member
0 Likes
1,077

Hi Tom,

You have to use TEXT EDIT CONTROL concept for this to achieve.

[Custom Controls|http://help.sap.com/saphelp_nw04/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/content.htm]

Regards

Abhii

Read only

0 Likes
1,077

Hi Abhii,

Thanks a lot for the guide. I followed the steps and was able to get through.

However, I have a small problem.

In the text editor, when i give the contents as follows:

line1

line2

the contents gets stored in the string text as " line1##line2 ", with ABAP using '##' as separator.

When I use this ABAP statement:

SPLIT TEXT AT '##' INTO TABLE ITAB.

This ABAP statement does not work.

Pl. help in this regard.

Regards,

Tom Jerry.

Read only

0 Likes
1,077

Hi Tom,

It works, I have tried doing a small program.

Have a look at the below code snippet.

REPORT ztext_editor .

TYPES: BEGIN OF itab_type,
        word(20),
      END   OF itab_type.

DATA: itab TYPE STANDARD TABLE OF itab_type WITH
                NON-UNIQUE DEFAULT KEY INITIAL SIZE 5,
                wa LIKE LINE OF itab.

DATA : text(80).

text = 'line1##line2'.

SPLIT text AT '##' INTO TABLE itab.

LOOP AT itab INTO wa.
  WRITE:/ wa-word.
ENDLOOP.

OUTPUT IS : line1 line2

Close the thread if this solves your query.

Regards

Abhii

Read only

0 Likes
1,077

Use the method get_text_as_r3table of class CL_GUI_TEXTEDIT to get the data into an internal table. Declare this internal table with a field of type c and length 256.

SKJ

Read only

0 Likes
1,077

Hi,

DATA : Begin of IT_STRING ,

field type string,

end of IT_STRING.

SPLIT TEXT AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB INTO TABLE IT_STRING.

Regards,

Sri

Read only

Former Member
0 Likes
1,077

thread closed.