Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

convert so10 text to word document with html code

Former Member
0 Likes
2,704

Dear Team,

how to fetch  text from so10 text to word document with styles . in my so10 text i have html code for bold , font size , etc.

thanks in advance.

10 REPLIES 10
Read only

egenoves
Participant
0 Likes
1,911

Hi,

you could use the FM READ_TEXT, which is the standar function for reading texts.

If you already have the html tag codes in the text stream, downloading directly into a file with a extension associated to Word will open it i think.

Regards

Read only

Former Member
0 Likes
1,911

HI Enrique,

thank you for replay, could you explain me in brief , how to download file with .html extension.

Read only

Bhushan_hs
Participant
0 Likes
1,911

Hi Chandrakala,

I doubt weather we can get the style details from from SO10 directly, but you can the properties such bold under line etc using ole concept.

refer below link for more information, refer section b)  Setting font attributes to know how to pass formatting to a word file

http://wiki.scn.sap.com/wiki/display/ABAP/Download+Data+into+Word+Document+using+OLE+Automation

Regards,

Bhushan

Read only

0 Likes
1,911

Hi Nagabhushan,

Thanks for reply. in my word document contains 4 paragraphs and it contains different styles.

hence i am using so10 text . below code for dispaly word:

1.fm :  read_text ---> read so10 document

2. convert table data to xstring format .

3. for dispalying document: cALL METHOD CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE .

output is dispalyed as like below:

<p> <font face="Times New Roman" size="3"> Dear Sir/Madam, <BR> The Bill DDO Request is intiated and it is pending for your approval,                            please take action, go to the below path DDO 123 <br> apcfms->mss->budget approval. <BR><BR> <b> Regards,<br> SAP Support Team </b>.                                                                                                               <br> <br> <br> <b><leftr><i><font color = "BLUE">                                                                                                   This is an auto generated Email. </b></leftr></i></font color>                                                                                                        </P></font>

html tags also displayed as it is in so10 text.



Read only

0 Likes
1,911

Hi Chandrakala,

Don't use HTML tags in SO10 instead refer the link provided by me to format the Data in Word file.

Regards,

Bhushan

Read only

0 Likes
1,911

HI,

i have to pass table to word document table and some screen fields also hence i am created the so10 with html tags to design table and alignement properties , how to  convert html tags .

Read only

0 Likes
1,911

Hi Chandrakala.

What you can do is simply store the text in SO10. Then use OLE to display as you need

Nabheet

Read only

0 Likes
1,911

hi ,

could you tell me how to pass standard text to ole, i have so10 text with html tags .

Read only

Former Member
0 Likes
1,911

This message was moderated.

Read only

0 Likes
1,911

hi ,

I  want convert so10 text to  word document is there any other alternative .