cancel
Showing results for 
Search instead for 
Did you mean: 

Multiline text in cell of the table

Former Member
0 Kudos

Hi Experts,

I have internal table wich has field (type STRING).

Value field is for example ' <?p?>?line1?<?/?p?>?<?p?>?line2?</p>?' Without '?'

It means that value in one cell of the table should be so :

line1

line2

I cannot to use FormattedTextView for table column.

What I can to use instead this?

Thanks in advance

Evgeniy

Edited by: Evgeny Vazhev on May 5, 2011 2:03 PM

Edited by: Evgeny Vazhev on May 5, 2011 2:04 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

I dont think so it is possible in Table, but you can acieve this in ALV using wrap text.

Please go through this..

Cheers,

Kris.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Hi

>

> I dont think so it is possible in Table, but you can acieve this in ALV using wrap text.

> Cheers,

> Kris.

You can do a wrapText property within the normal table as well, but I don't see how that is going to help splitting based upon the XHTML tags.

Former Member
0 Kudos

Hi Thomas,

Thanks for updating me..

Cheers,

Kris.

Former Member
0 Kudos

Hi Thomas,

Thank you. I have maintained property "wrapping'' in textview of the table column. But it doesn't work with XHTML tags.

Element FormattedTextView supports XHTML Tags, but it is not supported for table.

Thanks,

Evgeniy

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

> I have maintained property "wrapping'' in textview of the table column. But it doesn't work with XHTML tags

That's exactly why in my previous post that I suggested that you remove the XHTML tags and replace them with the carriage return control character. Have you tried this?

Former Member
0 Kudos

Thank you.

It works ok. But how to replace others tags and save format?

May be any methode for convertion?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Thank you.

> It works ok. But how to replace others tags and save format?

> May be any methode for convertion?

Perhaps you could expand on what you mean. You could with a regular expression remove all XHTML tags pretty easily. There is no way to present other formatting options, however. The TextView simply can't handle formatting and any UI element that could present formatting can't be used within the Table as a Cell Editor.

Former Member
0 Kudos

Hi Thomas,

I will create new area below table for display formatted text from table.

But how I can delete all XHTML tags via REPLACE Stetement in textview of table column? It's so much different tags

Thanks in advance.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>It's so much different tags

That's why I suggested a regular expression for the replace. With regular expression you can match on any begin/end tag marker regardless of the inner content. Here are some examples of such regular expressions:

http://weblogs.asp.net/rosherove/archive/2003/05/13/6963.aspx

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Since you can't use the formatted UI elements, you will need to remove the XHTML formatting. I would suggest perform text replacement and removing the

<p>

completely and replacing the

</p>

with cl_abap_char_utilities=>cr_lf.

Try that with the textView. If the carriage return isn't used in the text view, you might swap the UI element to a disabled textEdit UI element instead.