‎2009 Jul 31 8:50 AM
Hi ,
I am trying to send an internal table as an excel attachment thru an email.
I am converting the internal table into HTML format using the FM 'WWW_ITAB_TO_HTML' and then sending the mail using the BCS classes. I am trying to display the data in the excel sheet as a table.
When i check the excel attachment , i found that some of the values under a column gets misplaced and appears at the top of the excel.
Now i tried to download ( while debugging ) the internal table returned by the WWW_ITAB_TO_HTML and open it as an HTML file. The HTML file does not open properly . The data appears more or less similar to what i see in the excel attachment .
So i think there is some problem with the WWW_ITAB_TO_HTML' . I amy be wrong too on this.
Any pointers towards the issue resolution are welcome.
Thanks,
Avanish Joshi
‎2009 Jul 31 9:52 AM
Hello,
function module WWW_ITAB_TO_HTML is very correct and you are trying to display HTML code as EXCEL which is causing problem as it is not possible to display it as EXCEL. Instead if you open it as HTML file using internal explorer then it will display the data in proper format.
Hope this helps.
Thanks,
Augustin.
‎2009 Jul 31 9:52 AM
Hello,
function module WWW_ITAB_TO_HTML is very correct and you are trying to display HTML code as EXCEL which is causing problem as it is not possible to display it as EXCEL. Instead if you open it as HTML file using internal explorer then it will display the data in proper format.
Hope this helps.
Thanks,
Augustin.
‎2009 Jul 31 10:23 AM
Hi ,
I am currently working on a unicode system.
The same set of the data is displayed correctly in EXCEL in non-unicode system . In the non-unicode system, SO_SEND...API1 FM was used to send the email.
However because of the problems with the excel attachment in unicode system, i have replaced the call to the API1 FM with the BCS class and this is where the problem starts.
Let me explain how to do i generate the mail in the BCS class in brief.
I move the records in the internal table returned by the WWW_ITAB_TO_HTML into a string. I then pass this to the CL_BCS_CONVERT=>string_to_solix to get an internal table in binary format which i then use to create attachment
Thanks,
Avanish Joshi
‎2009 Aug 13 12:33 PM
I used the method CL_BCS_CONVERT=>TXT_TO_SOLIX and it worked.
Thanks.