cancel
Showing results for 
Search instead for 
Did you mean: 

Question about cl_wd_formatted_text=>create_from_sapscript

Former Member
0 Kudos

hi,

Does anybody meet such circumstance that when using create_from_sapscript method , if the tdline contains any default tag used by formatted textview like '<h3>' ? it is completely transfered by the backend code.

How to deal with such circumstance?

Best regards,

Accepted Solutions (1)

Accepted Solutions (1)

Uwe_Klinger
Advisor
Advisor
0 Kudos

Hi,

I don't quite understand the problem. Could you please give an example and explain what you expect and what you get.

If you think that this is a bug in the conversion then please open an internal message.

Best Regards,

Uwe

Former Member
0 Kudos

hi, Uwe,

Please take a look at the following code:

DATA : formatted_text TYPE REF TO cl_wd_formatted_text.

DATA : sapscript_head TYPE thead.

DATA : lt_text_result TYPE TABLE OF tline .

DATA : ls_text_result like line of lt_text_result.

ls_text_result-tdformat = '*'.

ls_text_result-tdline = ' &lt;h3&gt; '.

append ls_text_result to lt_text_result.

" convert from context

formatted_text = cl_wd_formatted_text=>create_from_sapscript(

sapscript_head = sapscript_head

sapscript_lines = lt_text_result ).

if formatted_text is bound.

DATA : lv_tmp_str type string .

lv_tmp_str = formatted_text->m_xml_text.

endif.

if the tdline with special tag used by sapscript, the &lt;h3&gt; will be converted to space automatically.

But I need to let the &lt;h3&gt; to be still there.

Best regards,

Uwe_Klinger
Advisor
Advisor
0 Kudos

Hi,

so you want to preseve spaces. If spaces gets lost it is an error in the conversion. But remember that in HTML output additional spaces will be ignored usually. It would be the best if you create an internal message on BC-WD-ABA, please provide an SAPScript Document in a R/3 system that shows the difference between the SAPScript output and the FormattedTextView.

Thanks,

Uwe

Former Member
0 Kudos

hi, Thanks for your information.

I'll create an internal note.

Best regards,

Answers (0)