Application Development 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: 

Create my own long texts

Former Member
0 Kudos

Hi people,

I have a question about creating, editing, displaying and deleting longtexts (like sapscript longtexts). How do you do this? I bet it's somewhere on the internet but I am not able to find it, been searching for hours now.

Please help me out...

Thanks in advance,

Maurice Brouwers

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

First you need to setup your text. You would do this via transaction code SE75. You will setup the text object and text id. I would suggest look at one which is delivered by SAP. Something like Material Text or maybe something from a sales document. Once you set the object/id, you need to determine the key in which you will access this text. For example, if you were creating text for a certain material and plant combination, the key would be material number and plant concatenated together. This is only an example, there is already a text object/id set up for material and plant, yet I forget what the actually text is called.

You can manuipulate the text using the function modules, READ_TEXT and SAVE_TEXT. You can program a user interface which uses the class CL_GUI_TEXTEDIT. This is a text box used to allow the user to enter text. I believe that there are some example programs, do a WHERE USED on the class, to see what's out there.

Regards,

Rich Heilman

5 REPLIES 5

Former Member
0 Kudos

Hi Maurice,

In SAP scripts usually you input the texts in the necessary windows with needed paragraph format.

In reports you can declare them as text elements.

If this is not what you are looking for please be more specific.

Regards,

Saji.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

First you need to setup your text. You would do this via transaction code SE75. You will setup the text object and text id. I would suggest look at one which is delivered by SAP. Something like Material Text or maybe something from a sales document. Once you set the object/id, you need to determine the key in which you will access this text. For example, if you were creating text for a certain material and plant combination, the key would be material number and plant concatenated together. This is only an example, there is already a text object/id set up for material and plant, yet I forget what the actually text is called.

You can manuipulate the text using the function modules, READ_TEXT and SAVE_TEXT. You can program a user interface which uses the class CL_GUI_TEXTEDIT. This is a text box used to allow the user to enter text. I believe that there are some example programs, do a WHERE USED on the class, to see what's out there.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi,

Thanks for your quick replies and I'm indeed not very clear with my question.

I created an screen exit in transaction IW21. Within this are some fields for example Description. Now the users also want to enter a long text belonging to this description. Unfortunately it's not possible to use any of the other longtext. Now I wondered if there are some functions like checking if a longtext exists, create/edit/etc longtext and so on.

I hope this clears some questions raised by my initial question.

Regards,

Maurice Brouwers

0 Kudos

Yes, you are talking about longtext which the user will enter in a "text" box. My previous post explains how to do that using a "text object/id".

Regards,

Rich Heilman

0 Kudos

Yep, you're right. I didn't read the post correctly. I have got it working now. Thank you very much for your help.

Maurice