cancel
Showing results for 
Search instead for 
Did you mean: 

SO10 texts in WD Formatted Text View with multiple lines.

Former Member
0 Kudos


Hi All,

I am using Standard text(SO10) in WebDynPro Abap View, Using Formatted Text View UI element.

I created a attribute of type STRING and binded it to Text Property of Formatted text View. In the View init() method, I fetched the SO10 text using FM  READ_TEXT. In Debugger when u select output view in HTML I got the desired text in new lines. where as in output I am getting all data in one line.

Please help me in this regard, and also request to suggest whether this can be achieved in any other way.

Thanks,

Susheel.

Accepted Solutions (1)

Accepted Solutions (1)

Ajit_K_Panda
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Susheel,

Can you please share the content from so10. how you have maintained in so10.

Regards,

Ajit

Former Member
0 Kudos

Dear Ajit,

Thanks for the response, please find screenshot below.

Regards,

Susheel.


    
 
 
 
 
 
 
 




Ajit_K_Panda
Product and Topic Expert
Product and Topic Expert

Hi Susheel,

I think you are using Read_text FM to get the content from standard text and concatenating into a string.

In that way you wont work. Formatted TextView requires a string value in XML format. You can achieve that using cl_wd_formatted_text class. Please check below code.

DATA lv_string TYPE string.

DATA lv_string_final TYPE string.

DATA f TYPE REF TO cl_wd_formatted_text.

*Lines - Internal table contaning texts from read_text fm

   LOOP AT lines INTO line.

     lv_string = line-tdline.

     f = cl_wd_formatted_text=>make_text(inner_text = lv_string tag = cl_wd_formatted_text=>e_tag-h1 ).

     CLEAR lv_string.

     CONCATENATE

          lv_string_final

          f->m_xml_text

       INTO lv_string_final.

   ENDLOOP.



Regards,

Ajit K Panda

Former Member
0 Kudos

It worked...!

Thank you Ajit.

Answers (1)

Answers (1)

0 Kudos

Hi,

Try using the table type STRING_TABLE for the attribute bound to the textview.

Regards,

Taiyeb