cancel
Showing results for 
Search instead for 
Did you mean: 

re: text editor in webdynpro

Former Member
0 Kudos

Hi Techies,

I need to have a text editor in my view, which will be used for entering the problems faced by the employees so that the mail would be sent to the hr regarding the problem.

Now just tell me what are the steps to be followed in dealing with text editor.

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Radhika

I alsoi need to save the text, the text cam be more than one paragraph i.e more than two paragraphs

Thamks in advance.

Former Member
0 Kudos

HI,

If ur text is a paragraph,then use data type string_table instead of string.

And while saving,loop at the string table to read the content as

loop at tablename into strture.

"here save the ls_structute into the db table

using insert command.

endloop.

Note : Strcuture should be of string type.

By the way,what is the data type at the backend table for this field?

Thanks,

Divya.S

Former Member
0 Kudos

Hi, Do you want to save the content in a database table in the same format as it is entered ? If so you have to create a field on type string of variable length in your database table and just pass the l_text field retrived as shown in my above reply and save it in your table. Regards, Radhika.

Former Member
0 Kudos

Hi, Like any other uielement, right click and insert the textedit uielement on your view. Create an attribute 'CA_TEXT' type string and bind it with the value property of your text edit. Change the cols and row property to adjust your text edit width and height. Use the following code to read the contents entered in the test edit,

Data: l_elem type ref to if_wd_context_element.
Data: l_text type string.

l_elem = wd_context->get_element( ).
l_elem->get_attribute( exporting name = 'CA_TEXT'
importing value = l_text }. "l_text will now have  the contents of your text edit.
Regards, Radhika.