cancel
Showing results for 
Search instead for 
Did you mean: 

display a text with many lines

Former Member
0 Kudos

is within WD UI Element availablw where by I can display a text with many lines ?

Regards

Marco M

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, TextEdit uielement is available, which is like a text area; user can enter free text in para's,multiple lines ,etc. Steps: 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.

Former Member
0 Kudos

Hi Radhika thx.

I am not intending to read the text

I want to output text with many lines where is retrieved from a select description from ******

statement

Reagrds

Marco

Former Member
0 Kudos

Hi Marco, For that case use set_attribute method instead of get_attribute;

Data: l_elem type ref to if_wd_context_element.
Data: l_text type string.
 
" select you data from data base
  select single ... into l_text...

l_elem = wd_context->get_element( ).
l_elem->set_attribute( exporting name = 'CA_TEXT'
value = l_text }. "l_text is your output of select query
Regards, Radhika.

Former Member
0 Kudos

Radhika thx.

Answers (1)

Answers (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi Marco,

The answer is yes. You can make use of the [TextEdit |http://help.sap.com/saphelp_nw70/helpdata/en/6a/a6884121a41c09e10000000a155106/content.htm] UI element for the same. You can find examples in the system in the Web Dynpro application, WDR_TEST_UI_ELEMENTS.

Regards,

Uday