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

Write a long text

Former Member
0 Likes
3,269

Hi,

I hope can anyone can help me..

I need write a text into a field. This field is a char(200) so I need that in the screen in the part of the field I can click it and open the screen where can write a long text. I don't know how to do that I've seen this function in the standar's screen.

Thks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,289

The function module CREATE_TEXT will call a text editor where the user can type in values. You can assign this FM call to a button on the screen.

The FMs SAVE_TEXT, READ_TEXT and EDIT_TEXT will help you perform other functions on this text object.

Have a look at the STXH table to understand the various parameters to be passed to these FMs.

Sudha

16 REPLIES 16
Read only

hymavathi_oruganti
Active Contributor
0 Likes
2,289

u can use write_text/ create_text fn modules

Read only

0 Likes
2,289

Hi Hyma,

I went thru some of your solutions and hope I can get the solution for my problem too.I want to disply the output as a stacked graph with multiple columns in X-Axis.

I tried with all the possible FMs, but could not find the expected requirements. Actually, I want to show multiple work-centres(12-15)in X-axis and their respective setup time and machine time(both should be stacked one above other) in Y-axis. Could you please help me with any solutions?????

Thanks....

Read only

Former Member
0 Likes
2,290

The function module CREATE_TEXT will call a text editor where the user can type in values. You can assign this FM call to a button on the screen.

The FMs SAVE_TEXT, READ_TEXT and EDIT_TEXT will help you perform other functions on this text object.

Have a look at the STXH table to understand the various parameters to be passed to these FMs.

Sudha

Read only

0 Likes
2,289

Ok I am going to try it.

In the screen Can I start write it in the field and then click the button and go to the text editor?

Read only

0 Likes
2,289

Hi Laura,

you could use Oo to do that job :

 
obj_editor           type ref to cl_gui_textedit,

   create object obj_editor
           exporting
             parent                     = obj_container_2_2
             wordwrap_mode              =
               cl_gui_textedit=>wordwrap_at_fixed_position
             wordwrap_position          = line_length
             wordwrap_to_linebreak_mode =
             cl_gui_textedit=>true.

* To set data into obj_editor
  call method obj_editor->set_text_as_stream
...

Rgd

Frédéric

Read only

0 Likes
2,289

So this Oo where I put it? And the what is obj_container_2_2 ?

Read only

0 Likes
2,289

You never write Oo program ?

Is it your own program ?

You can call a dynpro, set a Custom container inside, and the container is that :

obj_container_2_2 type ref to cl_gui_container

If you really don't know the Oo, maybe that will be to hard. (you can have a look to the DWDM transaction, that will give you example code).

Fred

Read only

0 Likes
2,289

It's a Z program, it's not mine but I have to modify it.

Read only

0 Likes
2,289

You could have a look to the two example provide by SAP :

SAPTEXTEDIT_DEMO_1

SAPTEXTEDIT_DEMO_3

Read only

0 Likes
2,289

Can anyone give an example about the fm create text?

thks

Read only

0 Likes
2,289

CREATE_TEXT need the key : TDID, TDSPRAS, TDNAME, TDOBJECT.

This key is the same key as the key of the table STXH. Have a look to this table to understand how it works.

Maybe, before use CREATE_TEXT, try to read a text that you have in this tables : STXH, STXL.

You could create for example a text with the transaction SO10. And try to read with READ_TEXT.

Frédéric

Read only

0 Likes
2,289

But when I use this FM, automatically open a new window where I can save the text?

Read only

0 Likes
2,289

Hi Laura,

USe FM SAVE_TEXT.

Read only

0 Likes
2,289

Laura,

to enter text use the function EDIT_TEXT.

best is to look this program : <b>SDTEXTE</b>.

Fred

Read only

0 Likes
2,289

Thanks a lot!!

Read only

0 Likes
2,289

Hi,

If your problem is solved,close the thread.