cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting - how to read a plain text string from a big text box?

Former Member
0 Kudos

HI!

I have a script requirement to read the text from a big text box.

I have found a function called "getTextString(session)" which does do this but it returns an html formatted string with lots of formatting information wrapped around the payload string...

Does anyone know of a way to get just the plain text string returned without any formatting?

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

try getTextPreview(). This would return the first 1000 characters without formatting information. If this is not sufficient guess you may have to do some custom code there..

Thanks,

Baski

Former Member
0 Kudos

I'm afraid getTextPreview() does not seem to be available in Version 7, but thanks for the suggestion.

Doing some more research ourselves we have found another class named com.sap.eso.api.doccommon.ont.types.BigTextValueIBeanIfc which has a function to get the string value called "getValueAsString()" but I have no idea how to access this object...

Thanks,

Stuart

Former Member
0 Kudos

My mistake... Looks like a such an api doesn't exist..

You can potentially use java regex api do something simillar i guess..

http://www.codeproject.com/KB/HTML/HTML_to_Plain_Text.aspx This examples seems complex but you can trim it down and make it simpler than this.

Thanks, Baski